Enabling HL7v2 Interfaces

To enable the HL7v2 messaging interfaces, the SanteDB iCDR host instance's configuration file needs to be updated to include the HL7ConfigurationSection as illustrated:

<SanteDBConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://santedb.org/configuration">
  <sections>
    <add type="SanteDB.Messaging.HL7.Configuration.Hl7ConfigurationSection, SanteDB.Messaging.HL7" />
  </sections>
  <section xsi:type="Hl7ConfigurationSection" 
          strictMetadata="false" requireAppAuth="false" 
          idReplacement="any-in-domain"  security="None">
    <!-- Classes of PLACE which can be used for a Birthplace Lookup -->
    <birthplaceClasses>
      <add>79DD4F75-68E8-4722-A7F5-8BC2E08F5CD6</add>
      <add>48B2FFB3-07DB-47BA-AD73-FC8FB8502471</add>
      <add>D9489D56-DDAC-4596-B5C6-8F41D73D8DC5</add>
      <add>FF34DFA7-C6D3-4F8B-BC9F-14BCDC13BA6C</add>
      <add>8CF4B0B0-84E5-4122-85FE-6AFA8240C218</add>
    </birthplaceClasses>
    <!-- The UUID of your local facility -->
    <facility>84039432-84E5-4122-85FE-6AFA8240C218</facility>
    <!-- The authority of your UUIDs -->
    <localAuthority>
      <domainName xmlns="http://santedb.org/model">YOUR_LOCAL_V2_AUTHORITY</domainName>
      <oid xmlns="http://santedb.org/model">1.3.6.1.4.1.52820.5.1.1.1.999</oid>
      <url xmlns="http://santedb.org/model">http://your/fhir/authority</url>
    </localAuthority>
    <!-- The SSN Authority from PID segment (map to PID-3) -->
    <ssnAuthority>
      <domainName xmlns="http://santedb.org/model">SSN</domainName>
      <oid xmlns="http://santedb.org/model">2.16.840.1.113883.4.1</oid>
      <url xmlns="http://santedb.org/model">http://hl7.org/fhir/sid/us-ssn</url>
    </ssnAuthority>
    <services>
      <!-- One or more IP/PORTS on which to bind -->
      <add address="llp://0.0.0.0:2100" name="LLP" receiveTimeout="20000">
        <!-- If you want to enable security Encryption
        <sllp checkCrl="false" requireClientCert="false">
          <serverCertificate findType="FindByThumbprint" storeName="My" storeLocation="CurrentUser" findValue="value" />
          <clientAuthorityCertificate findType="FindByThumbprint" storeName="My" storeLocation="CurrentUser" findValue="value" />
        </sllp>
        -->
        <messages>
          <add type="SanteDB.Messaging.HL7.Messages.QbpMessageHandler, SanteDB.Messaging.HL7, Version=1.10.0.0">
            <event isQuery="true" name="QBP^Q22" />
            <event isQuery="true" name="QBP^Q23" />
          </add>
          <add type="SanteDB.Messaging.HL7.Messages.AdtMessageHandler, SanteDB.Messaging.HL7, Version=1.10.0.0">
            <event isQuery="false" name="ADT^A01"/>
            <event isQuery="false" name="ADT^A04"/>
            <event isQuery="false" name="ADT^A08"/>
            <event isQuery="false" name="ADT^A40"/>
          </add>
        </messages>
      </add>
    </services>
  </section>

</SanteDBConfiguration>

Security Configuration

Anonymous User

If SanteDB is used in a context where SLLP is not used to authenticate devices, and senders do not support MSH-8 then you can set the authentication mode to none and set the @anonUser attribute. This attribute is the anonymous user account that you wish unauthenticated contexts to run under. By default, ANONYMOUS is used.

Metadata / Control Configuration

The elements which control metadata used by the HL7 message handler are:

Last updated