ehrbase / fhir-bridge

FHIR Bridge acts as a broker between an HL7 FHIR client and an openEHR server.
32 stars 20 forks source link

Resource "Condition" throws an error if I include the Profile URL. And acts otherwise if I do not. (Terminology server is enabled) #539

Open CzarMich opened 2 years ago

CzarMich commented 2 years ago

FHIR-Bridge throwing error if I include resourceType.meta.profile: "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19" I have the Terminology Server activated.

However if I exclude;

"id": "8cb12ab0-3563-4154-bfeb-25aa897c2105",
      "meta": {
        "profile": ["https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"]
      }

FHIR Bridge attempts to post the resource to the repository; I have included the sample resource and the error.

Thanks

{
    "resourceType": "Condition",
    "id": "8cb12ab0-3563-4154-bfeb-25aa897c2105",
      "meta": {
        "profile": ["https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19"]
      },
    "clinicalStatus": {
        "coding": [
            {
                "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
                "code": "active"
            }
        ]
    },
    "verificationStatus": {
     "coding":[
            {
                "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
                "code": "confirmed"
            }
        ]
    },
    "category": [
        {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/condition-category",
                    "code": "encounter-diagnosis",
                    "display": "Encounter Diagnosis"
                },
                {
                    "system": "http://snomed.info/sct",
                    "code": "439401001",
                    "display": "Diagnosis"
                }
            ]
        }
    ],
    "severity": {
        "coding": [
            {
                "system": "http://snomed.info/sct",
                "code": "24484000",
                "display": "Severe"
            }
        ]
    },
    "code": {
        "coding": [
            {
                "system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm",
                "version": "2020",
                "code": "B97.2",
                "display": "Coronavirus as the cause of diseases classified to other chapters"
            }
        ],
        "text": "Coronavirus as the cause of diseases classified to other chapters"
    },
    "bodySite": [
        {
            "coding": [
                {
                    "system": "http://snomed.info/sct",
                    "code": "49521004",
                    "display": "Left external ear structure"
                }
            ],
            "text": "Left Ear"
        }
    ],
    "subject": {
        "reference": "/Patient/002f71c6-26c3-483f-a256-55fd7a522b2e"
    },
    "onsetDateTime": "2012-05-24",
    "recorder": {
        "reference": "http://external.fhir.server/Practitioner/f201"
    }
}

Error


{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Condition.recordedDate: minimum required = 1, but only found 0 (from https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19)",
            "location": [
                "Condition",
                "Line 1, Col 2"
            ]
        },
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Condition.verificationStatus.coding:snomed: minimum required = 1, but only found 0 (from https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19)",
            "location": [
                "Condition.verificationStatus",
                "Line 16, Col 16"
            ]
        },
        {
            "severity": "information",
            "code": "processing",
            "diagnostics": "This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19",
            "location": [
                "Condition.category[0].coding[0]",
                "Line 26, Col 18"
            ]
        },
        {
            "severity": "information",
            "code": "processing",
            "diagnostics": "This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19",
            "location": [
                "Condition.category[0].coding[1]",
                "Line 31, Col 18"
            ]
        },
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Condition.category.coding:complication: minimum required = 1, but only found 0 (from https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19)",
            "location": [
                "Condition.category[0]",
                "Line 24, Col 10"
            ]
        },
        {
            "severity": "information",
            "code": "processing",
            "diagnostics": "This element does not match any known slice defined in the profile https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19",
            "location": [
                "Condition.code.coding[0]",
                "Line 50, Col 14"
            ]
        },
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Condition.code.coding:sct: minimum required = 1, but only found 0 (from https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/complications-covid-19)",
            "location": [
                "Condition.code",
                "Line 49, Col 20"
            ]
        }
    ]
}