Skip to content

Bonus Exercise Answer

Matthew Gramigna edited this page May 13, 2020 · 5 revisions

To view the answer in the module builder, go to https://synthetichealth.github.io/module-builder/ and click "Paste JSON", then paste the following contents and click "Load":

{
  "name": "EXM165",
  "remarks": [
    "A blank module"
  ],
  "states": {
    "Initial": {
      "type": "Initial",
      "direct_transition": "Age_Guard"
    },
    "Terminal": {
      "type": "Terminal"
    },
    "Diagnose_Hypertension": {
      "type": "ConditionOnset",
      "assign_to_attribute": "",
      "codes": [
        {
          "system": "SNOMED-CT",
          "code": 59621000,
          "display": "Essential Hypertension"
        }
      ],
      "direct_transition": "Hypertension_Delay"
    },
    "Outpatient_Encounter": {
      "type": "Encounter",
      "encounter_class": "ambulatory",
      "reason": "",
      "codes": [
        {
          "system": "SNOMED-CT",
          "code": 185465003,
          "display": "Weekend Visit (Procedure)"
        }
      ],
      "distributed_transition": [
        {
          "transition": "Record_BP",
          "distribution": 0.75
        },
        {
          "transition": "Terminal",
          "distribution": 0.25
        }
      ]
    },
    "Record_BP": {
      "type": "MultiObservation",
      "category": "vital-signs",
      "codes": [
        {
          "system": "LOINC",
          "code": "85354-9",
          "display": "Blood Pressure"
        }
      ],
      "observations": [
        {
          "category": "vital-signs",
          "codes": [
            {
              "system": "LOINC",
              "code": "8480-6",
              "display": "Systolic Blood Pressure"
            }
          ],
          "unit": "mm[Hg]",
          "range": {
            "low": 100,
            "high": 140
          }
        },
        {
          "category": "vital-signs",
          "codes": [
            {
              "system": "LOINC",
              "code": "8462-4",
              "display": "Diastolic Blood Pressure"
            }
          ],
          "unit": "mm[Hg]",
          "range": {
            "low": 60,
            "high": 90
          }
        }
      ],
      "direct_transition": "Terminal"
    },
    "Hypertension_Delay": {
      "type": "Delay",
      "exact": {
        "quantity": 3,
        "unit": "months"
      },
      "direct_transition": "Outpatient_Encounter"
    },
    "Age_Guard": {
      "type": "Guard",
      "allow": {
        "condition_type": "And",
        "conditions": [
          {
            "condition_type": "Age",
            "operator": ">=",
            "quantity": 18,
            "unit": "years",
            "value": 0
          },
          {
            "condition_type": "Age",
            "operator": "<=",
            "quantity": 85,
            "unit": "years",
            "value": 0
          }
        ]
      },
      "direct_transition": "Diagnose_Hypertension"
    }
  }
}
Clone this wiki locally