num-codex / odm2fhir

This tool maps study/patient data in CDISC ODM based on the GECCO data dictionary to HL7 FHIR which adheres to the GECCO profiles, value sets and code systems.
MIT License
4 stars 1 forks source link

UCUM units not valid #18

Closed makampf closed 3 years ago

makampf commented 3 years ago

Describe the bug FHIR-GW logs tell that UCUM units (exported with odm2fhir) are not valid (but in RedCap they actually are) (Compare: https://ucum.nlm.nih.gov/ucum-lhc/demo.html)

Reproduce Export from RedCap with package v0.3.0

Error Log Logs from FHIR-Gateway:

2021-02-01 16:57:43.043  WARN 1 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public org.springframework.http.ResponseEntity<java.lang.String> org.miracum.etl.fhirgateway.controllers.FhirController.postFhirRoot(java.lang.String) throws java.lang.Exception]
2021-02-01 17:15:05.393  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: kilogram"}]. Retrying 1. attempt.
2021-02-01 17:15:05.405  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: centimeter"}]. Retrying 1. attempt.
2021-02-01 17:15:05.428  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: pH"}]. Retrying 1. attempt.
2021-02-01 17:15:05.434  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: per minute"}]. Retrying 1. attempt.
2021-02-01 17:15:05.439  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: per minute"}]. Retrying 1. attempt.
2021-02-01 17:15:05.444  WARN 1 --- [nio-8080-exec-5] org.miracum.etl.fhirgateway.AppConfig    : HTTP Error occurred: 400 Bad Request: [{"error":"Exception during conversion: Error: Invalid UCUM unit: °C"}]. Retrying 1. attempt.

RedCap

image

cerbelding commented 3 years ago

That's strange. I just did a re-run of the complete pipeline (REDCap export, ODM2FHIR mapping and validation), but the problem you mention did not occur at my site. How does the coding of the units in your generated bundle.json look like?

It should be something like:

"valueQuantity": {
        "value": 84,
        "unit": "kilogram",
        "system": "http://unitsofmeasure.org",
        "code": "kg"
}

It seems like your fhirgateway is expecting the units code instead of its unit-value (=name)

makampf commented 3 years ago

Ok, Thank you! Currently I am not able to produce bundle.json files due to issue https://github.com/num-codex/odm2fhir/issues/17 but I will try later. Meanwhile I will check FHIR-Gateway for a possible bug.

makampf commented 3 years ago

Ok we actually had a bug in FHIR-GW. Thanks anyway.