Separating Models from Implementation

First, I love your ironical nickname!

The “web template” format could be described as a kind of pre-parsed version of OPT (operational template), would that work? It can be exported from Archetype Designer:

Yes, for example auto-generation of a template-specific JSON-schema for the simplified “structured” format (that is a tree- version of the same sematics as “flat format”) would be wonderful. I’d guess somebody with less rusty programming skills than me could easily make a generator that consumes a web template file and spits out a template-specific JSON schema…

Here is a piece of an instance example that should adhere to such a schema:

  "vital_signs": {
    "context": [
      {
        "context_detail": [
          {
            "tags": [
              "Example Tag 123"
            ]
          }
        ]
      }
    ],
    "body_temperature": [
      {
        "any_event": [
          {
            "temperature": [
              {
                "|magnitude": 38.8,
                "|unit": "°C"
              }
            ],
            "body_exposure": [
              {
                "|code": "at0033"
              }
            ],
            "description_of_thermal_stress": [
              "Description of thermal stress 51"
            ]
          }
        ],
        "site_of_measurement": [
          {
            "|code": "at0022"
          }
        ]
      }
    ],
    "blood_pressure": [
      { 
... and so on

Probably the schema should include the name of the at00XX-codes (at least as comments) to be readable, not only the codes.

3 Likes