Skip to main content

Unified Messaging: ADRXML Examples

Written by Wim Jans

🔗 Source article (Salesforce): Click here


This page lists a number of adr examples.


Message with one attachment to a doctor

Sends a message to the doctor with NIHII 10050881. No Body is given. As functional type the example uses 'dma-rep'. Indicating the attachment is a report of the medidoc format.

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
  <Addressee>
    <Quality>DOCTOR</Quality>
    <Identifier>10050881</Identifier>
    <EhboxIdType>NIHII</EhboxIdType>
  </Addressee>
  <Subject>Send message to NIHII doctor</Subject>
  <Patient>
    <INSS>changeme_toavalidinss</INSS>
    <FirstName>TestFirst</FirstName>
    <LastName>TestLast</LastName>
  </Patient>
  <Attachment>
    <Content>dGVzdCBkb2N0b3I=</Content>
    <Name>doctor.txt</Name>
    <MimeType>text/plain</MimeType>
    <FunctionalType>dma-rep</FunctionalType>
  </Attachment>
</ADR>

Message with one attachment to a doctor, from specified Sender


If you have multiple Ehealth-certificates charged in Unified Messaging, you can specify the sender (which defines the 'from' at the receiver).
If you don't specify a sender, UM will send with the default sender (the 'starred' Ehealth-certificate in the UM properties)
If the Ehealth-certificate of the given sender is not present in UM, then the file will be moved to ERROR.

Remark: <ApplicationId/> must be defined: it must match the ApplicationId of the ehealth-certificate of the sender.
It can be empty (like in this example), or it can be a defined ApplicationID.
If you do not define it correctly, the file will be moved to error.

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
  <Sender>
        <Quality>HOSPITAL</Quality>
        <Identifier>[valid-nihii]</Identifier>
          -- ApplicationId only necessary when your certificate does not have the empty applicationID
    </Sender>
  <Addressee>
    <Quality>DOCTOR</Quality>
    <Identifier>[valid-nihii]</Identifier>
    <EhboxIdType>NIHII</EhboxIdType>
  </Addressee>
  <Subject>Send message from specified sender to NIHII doctor </Subject>
  <Patient>
    <INSS>[valid-inss]</INSS>
    <FirstName>TestFirstpartient</FirstName>
    <LastName>TestLastpatient</LastName>
  </Patient>
  <Attachment>
    <Content>dGVzdCBkb2N0b3I=</Content>
    <Name>doctor.txt</Name>
    <MimeType>plain/text</MimeType>
    <FunctionalType>dma-rep</FunctionalType>
  </Attachment>
</ADR>

Message to a myDoctor in a hospital


Sends a message to the ehbox of hospital with NIHII 71030229 and adding information that is addressed to a specific doctor with identifier (= NIHII) 10000007

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
    <Addressee>
        <Quality>HOSPITAL</Quality>
        <Identifier>71030229</Identifier>
        <SubAddressee>
            <SubQualityType>DOCTOR</SubQualityType>
            <Identifier>10000007</Identifier>
        </SubAddressee>
    </Addressee>
    <Subject>hospital - mydoctor</Subject>
    <Attachment>
        <Content>aG9zcGl0YWwgbXlkb2N0b3I=</Content>
        <Name>base64.txt</Name>
        <MimeType>text/plain</MimeType>
        <FunctionalType>ala-lab</FunctionalType>
    </Attachment>
</ADR>

Message to a Department in a hospital

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
    <Addressee>
        <Quality>HOSPITAL</Quality>
        <Identifier>71030229</Identifier>
        <Name>hospital</Name>
        <SubAddressee>
            <SubQualityType>DEPARTMENT</SubQualityType>
            <Name>deptrhumatology</Name>
        </SubAddressee>
    </Addressee>
    <Subject>hospital - mydepartment - patient</Subject>
    <Patient>
        <INSS>changemetoavalidinss</INSS>
        <FirstName>Taty</FirstName>
        <LastName>Kononenka</LastName>
    </Patient>
    <Attachment>
        <Content>aG9zcGl0YWwgbXlkZXBhcnRtZW50</Content>
        <Name>base64.txt</Name>
        <MimeType>text/plain</MimeType>
        <FunctionalType>ala-lab</FunctionalType>
    </Attachment>
</ADR>


Unencrypted Message with one body to a hospital

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
    <Addressee>
        <Quality>HOSPITAL</Quality>
        <Identifier>71030229</Identifier>
        <EhboxIdType>NIHII</EhboxIdType>
    </Addressee>
    <Subject>hospital</Subject>
    <Body>
        <Content>SG9zcGl0YWwgdGVzdA==</Content>
        <Name>base64.txt</Name>
        <MimeType>text/plain</MimeType>
    </Body>
    <MetaData>
        <Key>encrypted</Key>
        <Value>false</Value>
    </MetaData>
</ADR>

Message to a citizen via eBOX (not via eHealthbox channel)

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
  <Addressee>
    <Quality>CITIZEN</Quality>
    <Identifier>85020125559</Identifier>
  </Addressee>
  <Subject>Send message to ebox</Subject>
  <Body>
    <Content>JVBERi0xLjQKJcOIw4HDhMOXD...</Content>
    <Name>helloworld.pdf</Name>
    <MimeType>application/pdf</MimeType>
    <FunctionalType>HealhtConnectTest</FunctionalType>
  </Body>
  <!-- Functional identifier of the message or application specific ID, can be used to fetch the message status -->
  <ClientMessageId>CM-000-000-001</ClientMessageId>
</ADR>


Send a message with custom metadata

send a message to Fedris.


<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
  <Addressee>
    <Quality>INSTITUTION</Quality>
    <Identifier>0206734318</Identifier>
  </Addressee>
  <Subject>vaccination_data</Subject>
  <Body>
    <Content>the XML file with real content, encoded in base64</Content>
    <MimeType>application/XML</MimeType>
  </Body>
    <MetaData>
        <Key>CM-SenderName</Key>
        <Value>name of external prevention service</Value>
    </MetaData>
    <MetaData>
        <Key>CM-Project</Key>
        <Value>Vaccines</Value>
    </MetaData>
    <MetaData>
        <Key>CM-KindOfForm</Key>
        <Value>choose VaccinationDeclarationReply  RefundRequestReply  MedicalCareCancellationReply  RefundRequestCancellationReply </Value>
    </MetaData>
</ADR>


Melding infectieziekte

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0" targetNamespace="urn:be:healthconnect:adr:1_0">
  <Addressee>
    <Quality>INSTITUTION_EHP</Quality>
    <Identifier>1990001916/Identifier>
    <ApplicationID>MELDINGINFECTIEZIEKTEN</ApplicationID>
  </Addressee>
  <Subject>mi_naamlabo_20190906_114421</Subject>
  <Attachment>
    <Content>base64encodedbusinessxml</Content>
    <Name>mi_naamlabo_20190906_114421.xml</Name>
    <FunctionalType>MELDINGINFECTIEZIEKTEN</FunctionalType>
  </Attachment>
</ADR>


Message to zorgmailaccount

<?xml version="1.0" encoding="UTF-8"?>
<ADR xmlns="urn:be:healthconnect:adr:1_0">
    <Sender>
        <Quality>ZORGMAIL</Quality>
        <Identifier>SOMEZORGMAILID</Identifier>
        <EhboxIdType>UNKNOWN</EhboxIdType>
    </Sender>
    <Addressee>
        <Quality>ZORGMAIL</Quality>
        <Identifier>SOMEZORGMAILID</Identifier>/Identifier>
        <EhboxIdType>UNKNOWN</EhboxIdType>
        <Name>Zorgmail doctor</Name>
    </Addressee>
    <Subject>Test gelieve te negeren</Subject>
    <Patient>
        <INSS>20111474115</INSS>
        <FirstName>Jan</FirstName>
        <LastName>Janssens</LastName>
    </Patient>
    <Attachment>
        <Content>NS83Nzc3Ny83Ny81NTUNCkRyLiBGcmFuayBGcmFuc3NlbnMNC...</Content>
        <Name>medical.rep</Name>
        <MimeType>xml</MimeType>
        <FunctionalType>DMA-REP</FunctionalType>
    </Attachment>
    <MetaData>
        <Key>encrypted</Key>
        <Value>true</Value>
    </MetaData>
    <MetaData>
        <Key>important</Key>
        <Value>false</Value>
    </MetaData>
</ADR>

Did this answer your question?