RED interchange API allows to send FHIR bundles to RED in order to create new data using a POST request.

POST request to create new data
{{baseURL}}/{{tenant}}/Bundle

Example: this POST requests creates data in RED if a FHIR bundle is attached

See RED Interchange API - Postman Collection

  • 0220 - Patient and DocumentReference 2. This request creates one encounter and two document references for an existing patient with provenances for user group assigment
  • 0221 - Patient and DocumentReference Full: This request creates a patient, an encounter and document reference with provenance and practitioner/organization set


The request header should set the content-type to "Content-Type": "application/fhir+xml; charset=UTF-8"

The request body must include a valid FHIR bundle with the items to create. 

  • patients are identified by their patient ID (Patient.id). If patients are created by interface RED will use the Patient.id from the Patient bundle for patient identification, and patient references of incoming data must always refer to this ID. That allows external systems to create patients in RED using their identifiers and to use the same ID in both systems.
  • all bundle items will be referenced by their IDs, their data in RED can be updated by sending a bundle with the same ID.


Example: RED receives a PDF document and creates a new person record entry for person

A patient record for a document entry always requires an additional encounter, because only encounters may refer to persons. The PDF document is converted to a base64-String and handed over in DocumentReference.content.attachment.data.

New document for patient 4723
<Bundle xmlns="http://hl7.org/fhir">
    <id value="10000"/>
    <meta>
        <versionId value="1"/>
        <lastUpdated value="2021-08-11T12:52:00+00:00"/>
        <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Bundle_Patientenakte|1.2.0"/>
    </meta>
    <type value="history"/>
    <entry>
        <resource>
            <DocumentReference>
                <id value="self_diagnosis-DKDEEDU1-TphQKgN4rdZsD5pu3767kMNprPqwkLGy-1631794662713-1631794665397"/>
                <identifier>
                    <type>
                        <coding>
                            <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_AW_Anlage_Identifiertyp"/>
                            <code value="Bezeichnung"/>
                        </coding>
                    </type>
                </identifier>
                <status value="current"/>
                <type>
                    <coding>
                        <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_AW_Anlagetyp"/>
                        <code value="Sonstige"/>
                    </coding>
                </type>
                <created value="2021-11-16T12:17:45Z"/>
                <description value="self_diagnosis"/>
                <content>
                    <attachment>
                        <contentType value="application/pdf"/>
                        <url value="self_diagnosis-DKDEEDU1-TphQKgN4rdZsD5pu3767kMNprPqwkLGy-1631794662713-1631794665396.pdf"/>
                        <data value="JVBERi0xLjMKJf////8KOSAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxCi9DQSAxCj.....MTczNAolJUVPRgo="/>
                        <title value="self_diagnosis"/>
                        <creation value="2021-11-16T12:17:45Z"/>
                    </attachment>
                </content>
                <context>
                    <encounter>
                        <reference value="Encounter/DKDEEDU1-TphQKgN4rdZsD5pu3767kMNprPqwkLGy-1631794662713"/>
                    </encounter>
                </context>
            </DocumentReference>
        </resource>
    </entry>
    <entry>
        <fullUrl value="/Encounter/DKDEEDU1-TphQKgN4rdZsD5pu3767kMNprPqwkLGy-1631794662713"/>
        <resource>
            <Encounter>
                <id value="DKDEEDU1-TphQKgN4rdZsD5pu3767kMNprPqwkLGy-1631794662713"/>
                <meta>
                    <lastUpdated value="2021-11-16"/>
                    <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Begegnung|1.2.0"/>
                </meta>
                <status value="arrived"/>
                <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_AW_Begegnung_Spezielle_Begegnungsinformationen">
                    <extension url="typ">
                        <valueCodeableConcept>
                            <text value="DOKTORDE"/>
                        </valueCodeableConcept>
                    </extension>
                </extension>
                <class>
                    <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
                    <code value="AMB"/>
                </class>
                <subject>
                    <reference value="Patient/4723"/>
                </subject>
                <participant>
                    <individual>
                        <reference value="PractitionerRole/MsEruEL8DtGI6JYfJpi86Mb0mMIrQkBw"/>
                    </individual>
                </participant>
                <serviceProvider>
                    <reference value="Organization/kDp86kMB1KU7a25JYBJlYundTTlJsJOh"/>
                </serviceProvider>
                <period>
                    <start value="2021-11-16T12:17:45Z"/>
                    <end value="2021-11-16T13:17:45Z"/>
                </period>
            </Encounter>
        </resource>
    </entry>
</Bundle>







 

  • No labels