Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Creating Patient error: expected: //fhir.hl7.org/ValueSet/$expand, actual: http://snomed.info/sct\"] #533

Open
CzarMich opened this issue Jan 25, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@CzarMich
Copy link

CzarMich commented Jan 25, 2022

I managed to get V1.4.2 running with BETTER EHR. But Creating Patient is not responding as expected. @birgerhaarbrandt

When I try to CREATE/post the current sample patient via Postman; I end up with the error:

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Error occurred while merging composition in EHRbase: Wrong Status code. Expected: [200, 201, 204]. Got: 422. Error message: {\"message\":\"Composition validation failed (there are missing or invalid values).\",\"validation_errors\":[\"Invalid terminology at /content[openEHR-EHR-ADMIN_ENTRY.person_data.v0,'Personendaten']/data[at0001,'Baum']/items[openEHR-EHR-CLUSTER.ethnischer_hintergrund.v0,'Ethnischer Hintergrund']/items[at0002,'Ethnischer Hintergrund']/value/defining_code, expected: //fhir.hl7.org/ValueSet/$expand, actual: http://snomed.info/sct\"]}"
        }
    ]
}

I was thinking of editing the template in the EHR to rather: "http://snomed.info/sct\".
Any suggestions?

This is how it looks like on the opt/ template in the ehr server file for patient.

   "localizedDescriptions": {
        "de": "Der ethnische Hintergrund einer Person."
      },
      "inputs": [
        {
          "list": [],
          "suffix": "code",
          "type": "TEXT",
          "terminology": "//fhir.hl7.org/ValueSet/$expand?url=https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/ethnic-groups"
        },
        {
          "list": [],
          "suffix": "value",
          "type": "TEXT",
          "terminology": "//fhir.hl7.org/ValueSet/$expand?url=https://www.netzwerk-universitaetsmedizin.de/fhir/ValueSet/ethnic-groups"
        }
      ]
    }
  ]
@CzarMich CzarMich added the bug Something isn't working label Jan 25, 2022
@SevKohler
Copy link
Contributor

can you provide me the fhir resource ?

@CzarMich
Copy link
Author

can you provide me the fhir resource ?
Attached.
POLAR_Testdaten_UKB.zip

@SevKohler
Copy link
Contributor

SevKohler commented Jan 26, 2022

First of all thats super a lot of resources how am i supposed to debug which one does not work ?
Secondly the bundles ocntain ressources that are not supported for the NUM CODEX and therefore was never mapped.
For all supported profiles check the Profile.java class.
If you want me to help you please provide me the exact resource.

@CzarMich
Copy link
Author

CzarMich commented Jan 26, 2022

Here is a test patient that you can use. This is the resource producing the mentioned error: Sources; Postman Collections

`{
    "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"
            }
        },
        {
            "extension": [
                {
                    "url": "dateTimeOfDocumentation",
                    "valueDateTime": "2020-10-01"
                },
                {
                    "url": "age",
                    "valueAge": {
                        "value": 68,
                        "unit": "years",
                        "system": "http://unitsofmeasure.org",
                        "code": "a"
                    }
                }
            ],
            "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age"
        }
    ],
    "identifier": [
        {
            "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym",
            "value": "codex_6348Q7"
        }
    ],
    "birthDate": "1952-09-30"
}`

@SevKohler
Copy link
Contributor

SevKohler commented Jan 26, 2022

Anyhow currently my term server does not work and requires reconfig i asked @subigre to help me with that.
With a newer version now the identifier requires a type, you need to add it.
This does not explain the error, but you should at it.

{
  "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"
      }
    },
    {
      "extension": [
        {
          "url": "dateTimeOfDocumentation",
          "valueDateTime": "2020-10-01"
        },
        {
          "url": "age",
          "valueAge": {
            "value": 68,
            "unit": "years",
            "system": "http://unitsofmeasure.org",
            "code": "a"
          }
        }
      ],
      "url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/age"
    }
  ],
  "identifier": [
    {
      "system": "http://www.netzwerk-universitaetsmedizin.de/sid/crr-pseudonym",
  "type": {
                "coding":  [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                        "code": "ANON"
                    }
                ]
            },      "value": "codex_6348Q7"
    }
  ],
  "birthDate": "1952-09-30"
}

@CzarMich
Copy link
Author

Identifier type added.

@CzarMich
Copy link
Author

So I deleted the extension: {
"url": "https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/ethnic-group",
"valueCoding": {
"system": "http://snomed.info/sct",
"code": "186019001",
"display": "Other ethnic, mixed origin"
}
}

Pushed to server and Patient was created. I believe this can be used to close/solve the issue #534

I checked on Better EHR server, and Patient does exists. 👍

@subigre
Copy link

subigre commented Jan 26, 2022

Dear @CzarMich

First of all, I apologize for the late reply but I did not pay attention to this repository since a while as I am now working on EHRbase only.

Based on the initial error and the web template. I think that the issue comes from the Better server.

Could you please try the following (even if it is completely wrong):

 "system": "http://snomed.info/sct",

by

 "system": "//fhir.hl7.org/ValueSet/$expand",

@CzarMich
Copy link
Author

CzarMich commented Jan 27, 2022

Hi @subigre , I had tried this already, I do get the error below;

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Coding.system must be an absolute reference, not a local reference",
            "location": [
                "Patient.extension[0].value.ofType(Coding)",
                "Line 12, Col 53"
            ]
        }
    ]
}

@subigre
Copy link

subigre commented Jan 27, 2022

Ah right, this one comes from the FHIR Bridge and HAPI FHIR validation API 😢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants