{
  "hookInstance": "f24dfe5e-9480-429f-9b27-2af9c6512345",
  "hook": "order-select",
  "fhirServer": "https://dikb.org/baseDstu3",
  "user": "Practitioner/COREPRACTITIONER1",
  "patient": "f101",
  "extension" : {
     "pddi-configuration-items" : {
       "cache-for-order-sign-filtering":false,
       "show-evidence-support": true,
       "alert-non-serious": true
     }
   },
  "context":{
    "patientId": "f101",
    "encounterId":"e101",
    "selections":["MedicationRequest/ketorolac-draft-order-test"],
    "draftOrders": {
      "resourceType": "Bundle",
      "entry": [
        {
          "resource": {
            "resourceType": "MedicationRequest",
            "id":"ketorolac-draft-order-test",
            "authoredOn": "2020-02-05",
            "status": "draft",
            "subject": {
              "reference": "Patient/f101"
            },
            "dosageInstruction": [
              {
                "doseQuantity": {
                  "value": 1,
                  "system": "http://unitsofmeasure.org",
                  "code": "{pill}"
                },
                "timing": {
                  "repeat": {
                    "frequency": 1,
                    "period": 1,
                    "periodUnit": "d"
                  }
                }
              }
            ],
            "medicationCodeableConcept": {
              "text": "Ketorolac Tromethamine 10 MG Oral Tablet",
              "coding": [
                {
                  "display": "Ketorolac Tromethamine 10 MG Oral Tablet",
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "834022"
                }
              ]
            }
          }
        }
      ]
    }
  },
  "prefetch": {
    "item6": {
      "resourceType": "Bundle",
      "id": "156c5bf1-dbd7-4cf8-9f05-af13f1d201e5",
      "meta": {
        "lastUpdated": "2020-03-01T09:38:54.162+00:00"
      },
      "type": "searchset",
      "total": 1,
      "link": [
        {
          "relation": "self",
          "url": "https://dikb.org/baseDstu3/Condition?patient=f101"
        }
      ],
      "entry": [
        {
          "fullUrl": "https://dikb.org/baseDstu3/Condition/c101",
          "resource": {
            "resourceType": "Condition",
            "id": "c101",
            "meta": {
              "versionId": "1",
              "lastUpdated": "2020-03-01T09:04:41.038+00:00"
            },
            "clinicalStatus": "active",
            "verificationStatus": "differential",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "12847006",
                  "display": "Acute duodenal ulcer with hemorrhage"
                }
              ]
            },
            "subject": {
              "reference": "Patient/f101"
            },
            "assertedDate": "2020-03-01"
          },
          "search": {
            "mode": "match"
          }
        }
      ]
    },
    "item2": {
      "resourceType": "Bundle",
      "id": "771d30c6-6fc3-4dbd-835d-5679c30add40",
      "meta": {
        "lastUpdated": "2020-03-01T09:38:58.617+00:00"
      },
      "type": "searchset",
      "total": 3,
      "link": [
        {
          "relation": "self",
          "url": "https://dikb.org/baseDstu3/MedicationRequest?authoredon=ge2020-03-01&patient=f101"
        }
      ],
      "entry": [
        {
          "fullUrl": "https://dikb.org/baseDstu3/MedicationRequest/r101",
          "resource": {
            "resourceType": "MedicationRequest",
            "id": "r101",
            "meta": {
              "versionId": "2",
              "lastUpdated": "2020-03-01T09:04:41.715+00:00"
            },
            "status": "active",
            "intent": "order",
            "category": {
              "coding": [
                {
                  "system": "http://hl7.org/fhir/medication-request-category",
                  "code": "outpatient"
                }
              ]
            },
            "medicationCodeableConcept": {
              "coding": [
                {
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "855350",
                  "display": "Warfarin Sodium 0.5 MG Oral Tablet"
                }
              ]
            },
            "subject": {
              "reference": "Patient/f101"
            },
            "context": {
              "reference": "Encounter/e101"
            },
            "authoredOn": "2020-03-01",
            "dosageInstruction": [
              {
                "timing": {
                  "repeat": {
                    "frequency": 1,
                    "period": 3,
                    "periodUnit": "d"
                  }
                },
                "asNeededBoolean": false,
                "doseQuantity": {
                  "value": 1,
                  "unit": "patch"
                }
              }
            ],
            "dispenseRequest": {
              "validityPeriod": {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression",
                    "valueString": "FHIR.Period { start: FHIR.dateTime { value: Today() - 4 months }, end: FHIR.dateTime { value: Today() + 3 months } }"
                  }
                ]
              },
              "numberOfRepeatsAllowed": 3,
              "expectedSupplyDuration": {
                "value": 30,
                "unit": "d"
              }
            }
          },
          "search": {
            "mode": "match"
          }
        }
	 ]
    }
  }
}
