fhir-bridge icon indicating copy to clipboard operation
fhir-bridge copied to clipboard

Error "Getting datenZurGeburt failed" while creating a Patient without a birth date

Open subigre opened this issue 3 years ago • 0 comments

Steps to reproduce

According to the profile https://simplifier.net/forschungsnetzcovid-19/patient, birthDate must be supported but it is not mandatory.

The current implementation returns an error when I try to create the following resource:

{
    "resourceType": "Patient",
    "meta": {
        "profile": [
            "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient"
        ]
    },
    "extension": [
        {
            "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group",
            "valueCoding": {
                "system": "http://snomed.info/sct",
                "code": "186019001",
                "display": "Other ethnic, mixed origin"
            }
        }
    ],
    "identifier": [
        {
            "system": "urn:ietf:rfc:4122",
            "value": "{{$guid}}"
        },
        {
            "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym",
            "value": "codex_123456"
        }
    ],
    "active": true,
    "name": [
        {
            "family": "{{$randomLastName}}",
            "given": [
                "{{$randomFirstName}}"
            ]
        }
    ]
}

Actual result

Status: 422 Unprocessable Entity

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Getting datenZurGeburt failed: null"
        }
    ]
}

Expected result

Status: 201 Created

{
    "resourceType": "Patient",
    "id": "1199698d-5b41-4c3d-b34b-3cef3bf41494",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2021-07-01T17:56:29.705+02:00",
        "profile": [
            "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/Patient"
        ]
    },
    "extension": [
        {
            "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group",
            "valueCoding": {
                "system": "http://snomed.info/sct",
                "code": "186019001",
                "display": "Other ethnic, mixed origin"
            }
        }
    ],
    "identifier": [
        {
            "system": "urn:ietf:rfc:4122",
            "value": "adee8b85-a77f-40a5-8967-f9acac806695"
        },
        {
            "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym",
            "value": "codex_123456"
        }
    ],
    "active": true,
    "name": [
        {
            "family": "Glover",
            "given": [
                "Adolphus"
            ]
        }
    ]
}

Success criteria

  • [ ] The defect has been fixed
  • [ ] The defect is checked by an unit or an integration test (Robot)
  • [ ] Merge Request approved
  • [ ] Unit tests passed
  • [ ] Build without errors
  • [ ] Release notes prepared
  • [ ] Runtime warnings

subigre avatar Jul 01 '21 15:07 subigre