miracum / fhir-gateway

A thin layer between FHIR REST clients and resource processing pipelines.
Apache License 2.0
13 stars 7 forks source link

observation code changes #43

Closed blrom1 closed 1 year ago

blrom1 commented 2 years ago

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.

noemide commented 2 years ago

I believe the error is here: https://github.com/miracum/fhir-gateway/blob/dd90929809dc85ab9c5350f6f63b4f6ddeee1692/src/main/java/org/miracum/etl/fhirgateway/processors/LoincHarmonizer.java#L85 Instead of replacing the code in the first Coding, the LOINC Coding needs to be identified and the code only be replaced there.

miracum-bot commented 1 year ago

:tada: This issue has been resolved in version 3.10.8 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: