miracum / fhir-gateway

A thin layer between FHIR REST clients and resource processing pipelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

observation code changes

blrom1 opened this issue ยท comments

After sending an observation to the gateway the resource is saved, but with differences in the codes.
This happens when I send an observation with two codings. Example:

    "code": {
        "coding": [
            {
                "system": "http://example.de/fhir/CodeSystem/icu/ObservationCode",
                "code": "g-THRO",
                "display": "Eb-THRO"
            },
            {
                "system": "http://loinc.org",
                "code": "777-3"
            }
        ]
    }

After sending the resource via HTTP PUT to the gateway URL, i can find the resource in the database, but with this code:

  "code": {
    "coding": [
      {
        "code": "777-3",
        "system": "http://example.de/fhir/CodeSystem/icu/ObservationCode",
        "display": "Platelets [#/volume] in Blood by Automated count"
      },
      {
        "code": "777-3",
        "system": "http://loinc.org"
      }
    ]
  }

I think this has something to do with the LOINC converter, but as I already have a LOINC code in this resource LOINC converter should not delete my observation code.

I believe the error is here:

harmonized.getCode().getCodingFirstRep().setCode(result.getSecond().getLoinc());

Instead of replacing the code in the first Coding, the LOINC Coding needs to be identified and the code only be replaced there.

๐ŸŽ‰ This issue has been resolved in version 3.10.8 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€