# Package be.ehealth.business.kmehrcommons

package be.ehealth.business.kmehrcommons
The kmehrcommons project use two classes to function. HcPartyBuilder : Used to generate each part of the final HcParty and verify, during the build, his structure (One cd min is required) HcPartyUtil : This class is the core of kmehrcommons. It contains some functions which permit the creation of a kmehr message. The function "createAuthorHcParties" use some properties which are specified in the config file.

### How to use the properties

In the properties file, you can create a complete kmehr message by using some specified properties. You need some names before the configuration : a project name (or something to identify your list of hcparty) and one name for each hcparty. First you need to precise if you want to use the default properties or not. If The property kmehr.project_name.usedefaultproperties is equal to "true", we will search after the properties with a project_name "default" to generate the kmehr message. If you specify "false",we continue to use your project_name. After that you need to precise each hcparty name by defining the property kmehr.project_name.hcpartylist which contains each name concatenate by a ",". When these properties are defined you can specify the content of each hcparty by using their project_name and hcparty_name in some specified properties : kmehr.project_name.hcparty_name1.id.local.type.idlocal_number => you can specify a lot of local id so you need to precise a number (the first is 1) .id.local.value.sv/sl/value.idlocal_number .id.idhcparty.sv/sl/value .id.inss.sv/sl/value .cd.local.sv/sl/value.cdlocal_number => you can specify a lot of local id so you need to precise a number (the first is 1) .cd.cdhcparty.sv/sl/value .name .firstname .lastname

### Example

The properties : kmehr.testphys.usedefaultproperties=false kmehr.testphys.hcpartylist=software,identifier kmehr.testphys.software.id.local.value.1=1990000332 kmehr.testphys.software.id.local.sv.1=1.0 kmehr.testphys.software.id.local.sl.1=application_ID kmehr.testphys.software.cd.cdhcparty.value=application kmehr.testphys.software.cd.cdhcparty.sv=1.0 kmehr.testphys.software.name=Physician software name kmehr.testphys.identifier.id.inss.value=52020845721 kmehr.testphys.identifier.id.inss.sv=1.0 kmehr.testphys.identifier.id.idhcparty.value=10998315001 kmehr.testphys.identifier.id.idhcparty.sv=1.0 kmehr.testphys.identifier.cd.cdhcparty.value=persphysician kmehr.testphys.identifier.cd.cdhcparty.sv=1.1 will generate the xml:

     invalid input: '<'HcpartyType xmlns:ns2="http://www.ehealth.fgov.be/standards/kmehr/schema/v1">
      invalid input: '<'ns2:id SL="application_ID" SV="1.0" S="LOCAL">1990000332invalid input: '<'/ns2:id>
      invalid input: '<'ns2:cd SV="1.1" S="CD-HCPARTY">applicationinvalid input: '<'/ns2:cd>
      invalid input: '<'ns2:name>Physician software nameinvalid input: '<'/ns2:name>

     invalid input: '<'HcpartyType xmlns:ns2="http://www.ehealth.fgov.be/standards/kmehr/schema/v1">
      invalid input: '<'ns2:id SV="1.0" S="ID-HCPARTY">10998315001invalid input: '<'/ns2:id>
      invalid input: '<'ns2:id SV="1.0" S="INSS">52020845721invalid input: '<'/ns2:id>
      invalid input: '<'ns2:cd SV="1.1" S="CD-HCPARTY">persphysicianinvalid input: '<'/ns2:cd>

- Related Packages
  Package
  Description
  be.ehealth.business.kmehrcommons.builders
  be.ehealth.business.kmehrcommons.mycarenet
  be.ehealth.business.kmehrcommons.util
  be.ehealth.business.kmehrcommons.validator
- Classes
  Class
  Description
  CDConsentBuilderUtil
  utility class to create CDCONSENT kmehr objects.
  HcPartyUtil
  utility class to create HcParty kmehr objects.