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 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.
<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> |
Example: RED receives patient, coverage and medication information and creates a new person, episode and patient record entry for a standard product (PZN)
<Bundle xmlns="http://hl7.org/fhir"> <id value="70535347-7053-5347-1776792b827"/> <meta> <lastUpdated value="2021-02-03T12:06:44.650+01:00"/> <profile value="https://fhir.kbv.de/StructureDefinition/74_PR_VoS_Bundle_VoS_PVS|1.10.010"/> </meta> <identifier> <system value="http://principa.com/vosbundle"/> <value value="70535347-7053-5347-1776792b827"/> </identifier> <type value="transaction"/> <link> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_Anwender_System"> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_PruefNummer"> <valueIdentifier> <system value="https://fhir.kbv.de/NamingSystem/74_NS_VoS_KBV-Pruefnummer"/> <value value="Y/400/1910/36/458"/> </valueIdentifier> </extension> </extension> <relation value="related"/> <url value="http://pvs.praxis-topp-gluecklich.local/fhir/Bundle/57eb40b4-07ba-b960-aca0-5227f5881292"/> </link> <entry> <resource> <Patient> <id value="4730"/> <meta> <versionId value="3"/> <lastUpdated value="2021-07-11T13:45:00+00:00"/> <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Patient|1.2.0"/> </meta> <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_AW_Patient_KostenuebernahmeIgeL"> <valueBoolean value="false"/> </extension> <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_AW_Patient_Zusatzinformationen"> <extension url="religionszugehoerigkeit"> <valueString value="ev."/> </extension> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/patient-citizenship"> <extension url="code"> <valueCodeableConcept> <coding> <system value="http://fhir.de/CodeSystem/deuev/anlage-8-laenderkennzeichen"/> <code value="D"/> </coding> </valueCodeableConcept> </extension> </extension> <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_AW_Patient_Vsdm_Zusatzinformationen"> <extension url="geschlecht"> <valueCoding> <system value="http://hl7.org/fhir/administrative-gender"/> <code value="female"/> </valueCoding> </extension> <extension url="geburtsdatum"> <valueDate value="1972-03-04"/> </extension> <extension url="adresse"> <valueAddress> <type value="physical"/> <line value="Musterstr. 43"> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> <valueString value="Musterstr."/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> <valueString value="43"/> </extension> </line> <city value="Hamburg"/> <postalCode value="20146"/> <country value="D"/> </valueAddress> </extension> </extension> <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Additional_Comment"> <valueString value="Sehr gute Patientin"/> </extension> <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="M040319722"/> </identifier> <name> <use value="official"/> <text value="Silke SE von Mustermann"/> <family value="Freifrau von Mustermann"> <extension url="http://fhir.de/StructureDefinition/humanname-namenszusatz"> <valueString value="SE"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"> <valueString value="von"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> <valueString value="Mustermann"/> </extension> </family> <given value="Silke"/> </name> <name> <use value="maiden"/> <family value="Schmitt"> <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> <valueString value="Schmitt"/> </extension> </family> </name> <telecom> <system value="phone"/> <value value="07755332211"/> </telecom> <telecom> <system value="email"/> <value value="m.mustermann@update.de"/> </telecom> <gender value="female"/> <birthDate value="1972-03-04"/> <address> <type value="both"/> <line value="Musterstr. 43"> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> <valueString value="Musterstr."/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> <valueString value="43"/> </extension> </line> <city value="Hamburg"/> <postalCode value="20146"/> <country value="D"/> </address> <maritalStatus> <coding> <system value="http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"/> <code value="M"/> </coding> </maritalStatus> <contact> <relationship> <coding> <system value="http://terminology.hl7.org/CodeSystem/v2-0131"/> <code value="CP"/> </coding> </relationship> <name> <family value="Mustermann"/> <given value="Fritz"/> </name> <telecom> <system value="phone"/> <value value="07755332212"/> </telecom> </contact> <communication> <language> <coding> <system value="urn:ietf:bcp:47"/> <code value="de-DE"/> </coding> </language> <preferred value="true"/> </communication> </Patient> </resource> </entry> <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="M040319722"/> </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/4730"/> </beneficiary> <payor> <identifier> <system value="http://fhir.de/NamingSystem/arge-ik/iknr"/> <value value="109577006"/> </identifier> </payor> <period> <start value="2022-04-01"/> <end value="2022-07-31"/> </period> </Coverage> </resource> </entry> <entry> <fullUrl value="/Practitioner/g4tcJvOhBU9hwTlwsKWDUhmT6Zku8b7M"/> <resource> <Practitioner xmlns="http://hl7.org/fhir"> <id value="g4tcJvOhBU9hwTlwsKWDUhmT6Zku8b7M"/> <meta> <versionId value="1"/> <lastUpdated value="2021-11-19T00:00:00+00:00"/> <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Behandelnder|1.2.0"/> </meta> <text> <status value="extensions"/> <div xmlns="http://www.w3.org/1999/xhtml">Behandler Konstantin Heinrich</div> </text> <identifier> <type> <coding> <system value="http://terminology.hl7.org/CodeSystem/v2-0203"/> <code value="LANR"/> </coding> </type> <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR"/> <value value="479999912"/> </identifier> <name> <use value="official"/> <text value="Konstantin Heinrich"/> <family value="Heinrich"> <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> <valueString value="Heinrich"/> </extension> </family> <given value="Konstantin"/> </name> <telecom> <system value="phone"/> <value value="017670834812"/> </telecom> <telecom> <system value="email"/> <value value="konstantin.heinrich@redmedical.de"/> </telecom> <address> <type value="both"/> <line value="Dudenstraße 11"> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> <valueString value="Dudenstraße"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> <valueString value="11"/> </extension> </line> <city value="Bad Hersfeld"/> <postalCode value="36251"/> <country value="D"/> </address> <gender value="male"> <extension url="http://fhir.de/StructureDefinition/gender-amtlich-de"> <valueCoding> <system value="http://fhir.de/CodeSystem/gender-amtlich-de"/> <code value="M"/> <display value="männlich"/> </valueCoding> </extension> </gender> <qualification> <code> <coding> <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BAR2_ARZTNRFACHGRUPPE"/> <code value="05"/> </coding> </code> </qualification> </Practitioner> </resource> </entry> <entry> <fullUrl value="/Organization/kDp86kMB1KU7a25JYBJlYundTTlJsJOh"/> <resource> <Organization xmlns="http://hl7.org/fhir"> <id value="kDp86kMB1KU7a25JYBJlYundTTlJsJOh"/> <meta> <versionId value="1"/> <lastUpdated value="2021-09-07T00:00:00+00:00"/> <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_AW_Betriebsstaette|1.2.0"/> </meta> <text> <status value="extensions"/> <div xmlns="http://www.w3.org/1999/xhtml">Organisation Dr. Heinrich</div> </text> <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_AW_Betriebsstaette_Hierarchie"> <valueCode value="BSNR"/> </extension> <identifier> <type> <coding> <system value="http://terminology.hl7.org/CodeSystem/v2-0203"/> <code value="BSNR"/> </coding> </type> <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR"/> <value value="AD1234500"/> </identifier> <name value="Dr. Heinrich"/> <address> <country value="D"/> </address> </Organization> </resource> </entry> <entry> <fullUrl value="http://172.25.1.77:29221/red_3/MedicationRequest/7f46adc9-b72e-8d3b-942e-c2a2ee6f5acc-4093"/> <resource> <MedicationRequest xmlns="http://hl7.org/fhir"> <id value="7f46adc9-b72e-8d3b-942e-c2a2ee6f5acc-4093"/> <meta> <profile value="https://fhir.kbv.de/StructureDefinition/74_PR_VoS_Rezept|1.10.010"/> </meta> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_KennzeichenStatus"> <valueCodeableConcept> <coding> <system value="https://fhir.kbv.de/CodeSystem/74_CS_VoS_KennzeichenStatus"/> <code value="00"/> </coding> </valueCodeableConcept> </extension> <extension url="http://fhir.de/StructureDefinition/rezept-zusatzinfos/0.2"> <extension url="gebuehrenfrei"> <valueBoolean value="false"/> </extension> </extension> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_RezeptTyp"> <valueCodeableConcept> <coding> <system value="https://fhir.kbv.de/CodeSystem/74_CS_VoS_RezeptTyp"/> <code value="M16"/> <display value="Muster 16"/> </coding> </valueCodeableConcept> </extension> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_MPKennzeichen"> <valueBoolean value="true"/> </extension> <groupIdentifier> <value value="70535347-7053-5347-4094"/> </groupIdentifier> <intent value="order"/> <medicationReference> <reference value="Medication/69873"/> </medicationReference> <subject> <reference value="Patient/4730"/> </subject> <authoredOn value="2023-05-18T12:05:00+01:00"/> <requester> <agent> <reference value="Practitioner/g4tcJvOhBU9hwTlwsKWDUhmT6Zku8b7M"/> </agent> <onBehalfOf> <reference value="Organization/kDp86kMB1KU7a25JYBJlYundTTlJsJOh"/> </onBehalfOf> </requester> <substitution> <allowed value="true"/> </substitution> </MedicationRequest> </resource> <request> <method value="POST"/> <url value="MedicationRequest"/> </request> </entry> <entry> <fullUrl value="http://172.25.1.77:29221/red_3/Medication/69873"/> <resource> <Medication xmlns="http://hl7.org/fhir"> <id value="69873"/> <meta> <profile value="https://fhir.kbv.de/StructureDefinition/74_PR_VoS_Medikament|1.10.010"/> </meta> <code> <coding> <system value="http://fhir.de/CodeSystem/ifa/pzn"/> <code value="10203603"/> </coding> <text value="Aspirin 500 mg 20 überzogene Tabletten"/> </code> <isOverTheCounter value="true"/> <form> <coding> <system value="http://fhir.de/CodeSystem/kbv/s-bmp-darreichungsform"/> <code value="UTA"/> <display value="Ueberzogene Tabletten"/> </coding> </form> <ingredient> <itemCodeableConcept> <text value="Acetylsalicyls??ure"/> </itemCodeableConcept> <amount> <numerator> <value value="500.0"/> <unit value="mg"/> <system value="http://unitsofmeasure.org"/> <code value="mg"/> </numerator> <denominator> <value value="1.0"/> <unit value="Stück"/> <system value="http://unitsofmeasure.org"/> <code value="1"/> </denominator> </amount> </ingredient> <package> <extension url="https://fhir.kbv.de/StructureDefinition/74_EX_VoS_AVP"> <valueMoney> <value value="7.38"/> <unit value="EUR"/> <system value="urn:iso:std:iso:4217"/> <code value="EUR"/> </valueMoney> </extension> <content> <itemCodeableConcept> <text value="Aspirin 500 mg überzogene Tabletten"/> </itemCodeableConcept> <amount> <value value="20"/> <unit value="st"/> <system value="http://unitsofmeasure.org"/> <code value="st"/> </amount> </content> </package> </Medication> </resource> <request> <method value="POST"/> <url value="Medication"/> </request> </entry> <entry> <fullUrl value="http://pvs.praxis-topp-gluecklich.local/fhir/MedicationStatement/e7cfc8b6-411d-44bf-a597-f756a6aa224f" /> <resource> <MedicationStatement> <id value="e7cfc8b6-411d-44bf-a597-f756a6aa224f" /> <meta> <profile value="https://fhir.kbv.de/StructureDefinition/74_PR_VoS_Dosierung|1.10.010" /> </meta> <status value="active"/> <medicationReference> <reference value="Medication/69873"/> </medicationReference> <subject> <reference value="Patient/4730"/> </subject> <taken value="na"/> <dosage> <timing> <code> <coding> <system value="http://hl7.org/fhir/v3/TimingEvent"/> <code value="HS"/> </coding> </code> </timing> <doseQuantity> <value value="1"/> <unit value="Stück"/> <system value="http://unitsofmeasure.org"/> <code value="1"/> </doseQuantity> </dosage> </MedicationStatement> </resource> <request> <method value="POST" /> <url value="/MedicationStatement/"/> </request> </entry> </Bundle> |