I finished my OPT SDK generator. It can generate an object-oriented classes for any OPT2.
Then I had an idea to save the OPT types tree to a JSON to help me debug my code.
I realized this might be an useful to others too. People can use JSON with OPT types (with included properties and constraints) to do anything they need - without dependence on my code generators.
The first reaction to the SDK JSON was: “this looks like Web Templates”. What do you think?
As JSON everything looks similar. With my version I can see some differences:
- My goal is not to simplify away the RM. I embrace it.
- My version is not meant to be used as “data format” only.
- My main target is generated OO code so I make sure that all the necessary abstract types are included.
Download full Vital signs examples:
…and please let me know if this is useful. Especially the JSON version.
A short example for JSON:
"BloodPressureObservationDataEventAnyEventDataBloodPressureItemSystolic": {
"parent_type_name_suffix": "Systolic",
"parent_type_name": "BloodPressureObservationDataEventAnyEventDataBloodPressureItem",
"type_name": "BloodPressureObservationDataEventAnyEventDataBloodPressureItemSystolic",
"extends_type_name": "ELEMENT",
"implements_type_name": "BloodPressureObservationDataEventAnyEventDataBloodPressureItem",
"properties": {
"value": {
"bmm_name": "value",
"bmm_type_name": "DV_QUANTITY",
"description": "Peak systemic arterial blood pressure - measured in systolic or contraction phase of the heart cycle.",
"path": "/data[id2]/events[id7]/data[id4]/items[id5]/value",
"logical_path": "/data[id2|History|]/events[id7|Any event|]/data[id4|blood pressure|]/items[id5|Systolic|]/value"
}
},
"constraints": {
"value": {
"_type": "Interval<DV_QUANTITY>",
"lower_unbounded": false,
"upper_unbounded": false,
"lower_included": true,
"upper_included": true,
"lower": {
"_type": "DV_QUANTITY",
"magnitude": 0.0,
"units": "mm[Hg]",
"property": {
"_type": "CODE_PHRASE",
"terminology_id": {"_type": "OBJECT_ID", "value": "openehr"},
"code_string": "125",
"_code_value": "Pressure"
},
"precision": 0
},
"upper": {
"_type": "DV_QUANTITY",
"magnitude": 1000.0,
"units": "mm[Hg]",
"property": {
"_type": "CODE_PHRASE",
"terminology_id": {"_type": "OBJECT_ID", "value": "openehr"},
"code_string": "125",
"_code_value": "Pressure"
},
"precision": 0
}
}
},
"locatable_archetype_node_id": "id5|Systolic|",
"locatable_name": "Systolic"
}