{
  "hookInstance": "31c74cfc-747c-4afc-82e4-bdd3b7a0a58c",
  "fhirServer": "http://localhost:8080/fhir",
  "hook": "order-sign",
  "context": {
    "userId": "Practitioner/example",
    "patientId": "Patient/example-rec-10-illicit-drugs",
    "encounterId": "Encounter/example-rec-10-illicit-drugs-context",
    "draftOrders": {
      "resourceType": "Bundle",
      "type": "collection",
      "entry": [
        {
          "resource": {
            "resourceType": "MedicationRequest",
            "id": "example-rec-10-illicit-drugs-context",
            "extension": [
              {
                "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
                "extension": [
                  {
                    "url": "dateLastUpdated",
                    "valueDateTime": "2023-05-01"
                  },
                  {
                    "url": "frequency",
                    "valueDuration": {
                      "value": 1.0,
                      "unit": "days",
                      "system": "http://unitsofmeasure.org",
                      "code": "d"
                    }
                  }
                ]
              }
            ],
            "status": "active",
            "intent": "order",
            "category": [
              {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                    "code": "community"
                  }
                ]
              }
            ],
            "medicationCodeableConcept": {
              "coding": [
                {
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "197696",
                  "display": "72 HR Fentanyl 0.075 MG/HR Transdermal System"
                }
              ]
            },
            "subject": {
              "reference": "Patient/example-rec-10-illicit-drugs"
            },
            "encounter": {
              "reference": "Encounter/example-rec-10-illicit-drugs-context"
            },
            "authoredOn": "2023-05-01",
            "dosageInstruction": [
              {
                "timing": {
                  "repeat": {
                    "frequency": 1,
                    "period": 12.0,
                    "periodUnit": "d"
                  }
                },
                "asNeededBoolean": false,
                "doseAndRate": [
                  {
                    "doseQuantity": {
                      "value": 1.0,
                      "unit": "patch",
                      "system": "http://unitsofmeasure.org",
                      "code": "{patch}"
                    }
                  }
                ]
              }
            ],
            "dispenseRequest": {
              "validityPeriod": {
                "start": "2023-05-01T00:00:00-06:00",
                "end": "2023-08-01T00:00:00-06:00"
              },
              "numberOfRepeatsAllowed": 3,
              "expectedSupplyDuration": {
                "value": 30.0,
                "unit": "days",
                "system": "http://unitsofmeasure.org",
                "code": "d"
              }
            }
          }
        }
      ]
    }
  },
  "prefetch": {
    "item1": {
        "resourceType": "Patient",
        "id": "example-rec-10-illicit-drugs",
        "extension": [
          {
            "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
            "extension": [
              {
                "url": "dateLastUpdated",
                "valueDateTime": "2023-05-01"
              },
              {
                "url": "frequency",
                "valueDuration": {
                  "value": 30.0,
                  "unit": "days",
                  "system": "http://unitsofmeasure.org",
                  "code": "d"
                }
              }
            ]
          }
        ],
        "gender": "female",
        "birthDate": "2003-05-01"
      }
    },
    "item2": null,
    "item3": null,
    "item4": null,
    "item5": null,
    "item6": null,
    "item7": {
        "resourceType": "Encounter",
        "id": "example-rec-10-illicit-drugs-prefetch",
        "extension": [
          {
            "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
            "extension": [
              {
                "url": "dateLastUpdated",
                "valueDateTime": "2023-05-01"
              },
              {
                "url": "frequency",
                "valueDuration": {
                  "value": 30.0,
                  "unit": "days",
                  "system": "http://unitsofmeasure.org",
                  "code": "d"
                }
              }
            ]
          }
        ],
        "status": "finished",
        "subject": {
          "reference": "Patient/example-rec-10-illicit-drugs"
        },
        "period": {
          "start": "2023-01-26",
          "end": "2023-01-26"
        }
    },
    "item8": {
        "resourceType": "Bundle",
        "entry": [
          {
            "resource": {
              "resourceType": "Observation",
              "id": "example-rec-10-illicit-drugs-prefetch-1",
              "extension": [
                {
                  "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
                  "extension": [
                    {
                      "url": "dateLastUpdated",
                      "valueDateTime": "2023-05-01"
                    },
                    {
                      "url": "frequency",
                      "valueDuration": {
                        "value": 30.0,
                        "unit": "days",
                        "system": "http://unitsofmeasure.org",
                        "code": "d"
                      }
                    }
                  ]
                }
              ],
              "status": "final",
              "category": [
                {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                      "code": "laboratory"
                    }
                  ]
                }
              ],
              "code": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "code": "70146-6",
                    "display": "Benzoylecgonine [Mass/volume] in Urine by Screen method"
                  }
                ]
              },
              "subject": {
                "reference": "Patient/example-rec-10-illicit-drugs"
              },
              "effectiveDateTime": "2022-11-25",
              "valueString": "POS",
              "interpretation": [
                {
                  "coding": [
                    {
                      "system": "http://hl7.org/fhir/v2/0078",
                      "code": "POS"
                    }
                  ]
                }
              ]
            }
          },
          {
            "resource": {
              "resourceType": "Observation",
              "id": "example-rec-10-illicit-drugs-prefetch-2",
              "extension": [
                {
                  "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
                  "extension": [
                    {
                      "url": "dateLastUpdated",
                      "valueDateTime": "2023-05-01"
                    },
                    {
                      "url": "frequency",
                      "valueDuration": {
                        "value": 30.0,
                        "unit": "days",
                        "system": "http://unitsofmeasure.org",
                        "code": "d"
                      }
                    }
                  ]
                }
              ],
              "status": "final",
              "category": [
                {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                      "code": "laboratory"
                    }
                  ]
                }
              ],
              "code": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "code": "8237-0",
                    "display": "Phencyclidine [Presence] in Urine by SAMHSA confirm method"
                  }
                ]
              },
              "subject": {
                "reference": "Patient/example-rec-10-illicit-drugs"
              },
              "effectiveDateTime": "2022-12-04",
              "valueString": "NEG",
              "interpretation": [
                {
                  "coding": [
                    {
                      "system": "http://hl7.org/fhir/v2/0078",
                      "code": "NEG"
                    }
                  ]
                }
              ]
            }
          },
          {
            "resource": {
              "resourceType": "Observation",
              "id": "example-rec-10-illicit-drugs-prefetch-3",
              "extension": [
                {
                  "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
                  "extension": [
                    {
                      "url": "dateLastUpdated",
                      "valueDateTime": "2023-05-01"
                    },
                    {
                      "url": "frequency",
                      "valueDuration": {
                        "value": 30.0,
                        "unit": "days",
                        "system": "http://unitsofmeasure.org",
                        "code": "d"
                      }
                    }
                  ]
                }
              ],
              "status": "final",
              "category": [
                {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                      "code": "laboratory"
                    }
                  ]
                }
              ],
              "code": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "version": "2.68",
                    "code": "11246-6",
                    "display": "oxyCODONE (U) [Mass/Vol]"
                  }
                ]
              },
              "subject": {
                "reference": "Patient/example-rec-10-illicit-drugs"
              },
              "effectiveDateTime": "2022-11-04",
              "valueString": "POS",
              "interpretation": [
                {
                  "coding": [
                    {
                      "system": "http://hl7.org/fhir/v2/0078",
                      "code": "POS"
                    }
                  ]
                }
              ]
            }
          },
          {
            "resource": {
              "resourceType": "Observation",
              "id": "example-rec-10-illicit-drugs-prefetch-4",
              "extension": [
                {
                  "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
                  "extension": [
                    {
                      "url": "dateLastUpdated",
                      "valueDateTime": "2023-05-01"
                    },
                    {
                      "url": "frequency",
                      "valueDuration": {
                        "value": 30.0,
                        "unit": "days",
                        "system": "http://unitsofmeasure.org",
                        "code": "d"
                      }
                    }
                  ]
                }
              ],
              "status": "final",
              "category": [
                {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                      "code": "laboratory"
                    }
                  ]
                }
              ],
              "code": {
                "coding": [
                  {
                    "system": "http://loinc.org",
                    "code": "8237-0",
                    "display": "Phencyclidine [Presence] in Urine by SAMHSA confirm method"
                  }
                ]
              },
              "subject": {
                "reference": "Patient/example-rec-10-illicit-drugs"
              },
              "effectiveDateTime": "2022-12-26",
              "valueString": "POS",
              "interpretation": [
                {
                  "coding": [
                    {
                      "system": "http://hl7.org/fhir/v2/0078",
                      "code": "POS"
                    }
                  ]
                }
              ]
            }
          }
        ]
    },
    "item9": null,
    "item10": {
        "resourceType": "MedicationRequest",
        "id": "example-rec-10-illicit-drugs-prefetch",
        "extension": [
          {
            "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/dataDateRoller",
            "extension": [
              {
                "url": "dateLastUpdated",
                "valueDateTime": "2023-05-01"
              },
              {
                "url": "frequency",
                "valueDuration": {
                  "value": 30.0,
                  "unit": "days",
                  "system": "http://unitsofmeasure.org",
                  "code": "d"
                }
              }
            ]
          }
        ],
        "status": "active",
        "intent": "order",
        "category": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                "code": "community"
              }
            ]
          }
        ],
        "medicationCodeableConcept": {
          "coding": [
            {
              "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
              "code": "1049502",
              "display": "12 HR Oxycodone Hydrochloride 10 MG Extended Release Oral Tablet"
            }
          ]
        },
        "subject": {
          "reference": "Patient/example-rec-10-illicit-drugs"
        },
        "encounter": {
          "reference": "Encounter/example-rec-10-illicit-drugs-prefetch"
        },
        "authoredOn": "2023-01-31",
        "dosageInstruction": [
          {
            "timing": {
              "repeat": {
                "frequency": 3,
                "period": 1.0,
                "periodUnit": "d"
              }
            },
            "asNeededBoolean": false,
            "doseAndRate": [
              {
                "doseQuantity": {
                  "value": 1.0,
                  "unit": "tablet",
                  "system": "http://unitsofmeasure.org",
                  "code": "{tablet}"
                }
              }
            ]
          }
        ],
        "dispenseRequest": {
          "validityPeriod": {
            "start": "2023-01-31T00:00:00-07:00",
            "end": "2023-05-01T00:00:00-06:00"
          },
          "numberOfRepeatsAllowed": 3,
          "expectedSupplyDuration": {
            "value": 35.0,
            "unit": "days",
            "system": "http://unitsofmeasure.org",
            "code": "d"
          }
        }
      }
    }
}
