Closed pcvolkmer closed 2 weeks ago
Thanks for the issue report, but this is just a temporary inconsistency:
The generated MTBPatientRecords conform to the internally used model, already aligned with "MTB Datensatz V2.0". However, the working basis over the last months has been that the ETL API should support MTB data submissions according to the format already established in bwHC, using an internal conversion of such payloads into the internal format.
Thus, the default JSON schema returned by the API represents this previous MTBPatientRecord format ("application/json"), thus leading to the apparent inconsistency between schema and JSON examples. However, you can explicitly request the JSON Schema of the new format "application/json+v2" by passing this content-type as query parameter in the JSON Schema request: GET /api/mtb/etl/patient-record/schema?format=application/json%B2v2
About the two formats: The new format aligned to "MTB Datensatz V2.0" already contains most new elements specified, but given that essentially all are optional, they don't represent particular breaking changes. The main differences from the new to the previous bwHC format, and thus breaking changes are:
However, in course of finalizing the changes to the MTBPatientRecord to conform to regulations of the model project (MVH), the previous "bwHC format" will not be supported anymore after all, but only the new one, so that JSON Schema and generated JSON examples will eventually be consistent with each other.
The generated fake patient mtb data does not match generated JSON schema.
Sources
Schema file and fake data are generated from example DNPM:DIP source:
Comparison
This will compare an example part of Schema with generated mtb data.
Definitions in schema
For example, a
Patient
is defined as:Gender
is defined as:Generated fake patient mtb data
Same part in generated fake patient mtb data does not use a string but an object:
Conclusion
The gender (and all other object values using a coding scheme) should use some kind of schema definition containing
code
,display
andsystem
.