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

{{baseURL}}/{{tenant}}/Bundle

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


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. 


Example: RED receives a FHIR bundle and creates a new person

<Bundle xmlns="http://hl7.org/fhir">
    <id value="10000"/>
    <meta>
        <versionId value="1"/>
        <lastUpdated value="2022-06-17T12:52:00+00:00"/>
        <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Bundle_Patientenakte|1.2.0"/>
    </meta>
    <type value="history"/>
    <entry>
        <fullUrl value="http://ife.local/fhir/Patient/A123123123"/>
        <resource>
            <Patient>
                <id value="A123123123"/>
                <meta>
                    <versionId value="1"/>
                    <lastUpdated value="2022-06-17T13:23:00+00:00"/>
                    <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Patient|1.2.0"/>
                </meta>
                <identifier>
                    <type>
                        <coding>
                            <system value="http://fhir.de/CodeSystem/identifier-type-de-basis"/>
                            <code value="GKV"/>
                        </coding>
                    </type>
                    <system value="http://fhir.de/NamingSystem/gkv/kvid-10"/>
                    <value value="A123123123"/>
                </identifier>
                <name>
                    <use value="official"/>
                    <text value="Vorname Nachname"/>
                    <family value="Nachname" />
                    <given value="Vorname"/>
                </name> 
                <telecom>
                    <system value="phone"/>
                    <value value="017670834813"/>
                </telecom>
                <telecom>
                    <system value="email"/>
                    <value value="vorname.nachname@email.de"/>
                </telecom>
                <gender value="male"/>
                <birthDate value="1990-08-18"/>
                <address>
                    <type value="both"/>
                    <line value="Straße 1">
                        <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName">
                            <valueString value="Straße"/>
                        </extension>
                        <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber">
                            <valueString value="1"/>
                        </extension>
                    </line>
                    <city value="Kiel"/>
                    <postalCode value="99997"/>
                    <country value="D"/>
                </address>
            </Patient>
        </resource>
    </entry>
</Bundle>


The request body may contain several entries, e.g. claims, diagnoses, encounters, coverages, medication. If the person has already been created in RED the FHIR bundle does not require a person entry, but each entry needs a reference to an existing person identifier.

Example: RED creates a new episode for an existing person (with ID 6202)

<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>
            <Coverage>
                <id value="TCI7596-1-1629639837586"/>
                <meta>
                    <versionId value="1"/>
                    <lastUpdated value="2021-08-22T15:43:57+0200"/>
                    <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Krankenversicherungsverhaeltnis|1.2.0"/>
                </meta>
                <identifier>
                    <type>
                        <coding>
                            <system value="http://fhir.de/CodeSystem/identifier-type-de-basis"/>
                            <code value="GKV"/>
                        </coding>
                    </type>
                    <system value="http://fhir.de/NamingSystem/gkv/kvid-10"/>
                    <value value="Y681518688"/>
                </identifier>
                <extension url="http://fhir.de/StructureDefinition/gkv/versichertenart">
                    <valueCoding>
                        <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_VERSICHERTENSTATUS"/>
                        <code value="1"/>
                    </valueCoding>
                </extension>
                <extension url="http://fhir.de/StructureDefinition/gkv/besondere-personengruppe">
                    <valueCoding>
                        <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_PERSONENGRUPPE"/>
                        <code value="00"/>
                        <display value="nicht gesetzt"/>
                    </valueCoding>
                </extension>
                <status value="active"/>
                <type url="http://fhir.de/StructureDefinition/gkv/besondere-personengruppe">
                    <coding>
                        <system value="http://fhir.de/CodeSystem/versicherungsart-de-basis"/>
                        <version value="0.2.3"/>
                        <code value="GKV"/>
                    </coding>
                </type>
                <beneficiary>
                    <reference value="Patient/6202"/>
                </beneficiary>
                <payor>
                    <identifier>
                        <system value="http://fhir.de/NamingSystem/arge-ik/iknr"/>
                        <value value="109577006"/>
                    </identifier>
                </payor>
                <period>
                    <start value="2022-01-02"/>
                    <end value="2022-03-31"/>
                </period>
            </Coverage>
        </resource>
    </entry>
</Bundle>


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

<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>