{
  "resourceType" : "MedicationRequest",
  "id" : "example-medicationrequest-with-extensions",
  "meta" : {
    "profile" : ["https://nshr-uat.sha.go.ke/fhir/StructureDefinition/ke-medication-request"]
  },
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: MedicationRequest example-medicationrequest-with-extensions</b></p><a name=\"example-medicationrequest-with-extensions\"> </a><a name=\"hcexample-medicationrequest-with-extensions\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ke-medication-request.html\">Kenya eRx MedicationRequest</a></p></div><blockquote><p><b>Prescription Digital Signature</b></p><ul><li>signatureType: <a href=\"http://hl7.org/fhir/R4/codesystem-signature-type.html#signature-type-1.462.46840.4610065.461.4612.461.461\">Signature Type Codes: 1.2.840.10065.1.12.1.1</a> (Author's Signature)</li><li>signatureValue: <code>U0lHTkFUVVJFX1BMQUNFSE9MREVS</code></li><li>signedBy: <a href=\"Practitioner-example-practitioner-njoroge.html\">Practitioner Sarah Njoroge (official)</a></li><li>signedOn: 2025-06-15 09:30:00+0300</li></ul></blockquote><blockquote><p><b>Refill Authorization</b></p><ul><li>authorizedRefills: 3</li><li>remainingRefills: 3</li><li>earliestRefillDate: 2025-07-15</li></ul></blockquote><blockquote><p><b>Controlled Substance Schedule</b></p><ul><li>isControlled: false</li></ul></blockquote><blockquote><p><b>Insurance Pre-Authorization</b></p><ul><li>authorizationNumber: SHA-2025-AUTH-001234</li><li>insurerName: Social Health Authority (SHA)</li><li>validFrom: 2025-06-15</li><li>validTo: 2025-09-15</li></ul></blockquote><p><b>identifier</b>: <a href=\"NamingSystem-ns-prescription-identifier.html\" title=\"System-generated prescription number that uniquely identifies a MedicationRequest across all dispensing points. Format: RX-{YYYY}-{SITE}-{SEQ}.\">KenyaPrescriptionIdentifier</a>/RX-2025-EXT-00001</p><p><b>status</b>: Active</p><p><b>intent</b>: Order</p><p><b>category</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/medicationrequest-category outpatient}\">Outpatient</span></p><p><b>medication</b>: <span title=\"Codes:{https://nshr-uat.sha.go.ke/fhir/CodeSystem/generic-products-cs GE10002}\">Metformin 500 mg Oral Tablet</span></p><p><b>subject</b>: <a href=\"Patient-example-patient-otieno.html\">James Otieno (official) Male, DoB: 1968-09-20 ( https://ilm-hie.dha.go.ke/fhir/NamingSystem/national-id#KenyaNationalId#10293847)</a></p><p><b>authoredOn</b>: 2025-06-15</p><p><b>requester</b>: <a href=\"Practitioner-example-practitioner-njoroge.html\">Practitioner Sarah Njoroge (official)</a></p><blockquote><p><b>dosageInstruction</b></p><p><b>text</b>: Take 1 tablet (500 mg) by mouth twice daily with meals</p><p><b>timing</b>: 2 per 1 day</p><p><b>route</b>: <span title=\"Codes:{https://nshr-uat.sha.go.ke/fhir/CodeSystem/route-of-administration-cs RT10025}\">Oral</span></p><h3>DoseAndRates</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Dose[x]</b></td></tr><tr><td style=\"display: none\">*</td><td>500 mg<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  codemg = 'mg')</span></td></tr></table></blockquote><h3>DispenseRequests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>NumberOfRepeatsAllowed</b></td><td><b>Quantity</b></td></tr><tr><td style=\"display: none\">*</td><td>3</td><td>60 tablet<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code1 = '1')</span></td></tr></table><h3>Substitutions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Allowed[x]</b></td></tr><tr><td style=\"display: none\">*</td><td>true</td></tr></table></div>"
  },
  "extension" : [{
    "extension" : [{
      "url" : "signatureType",
      "valueCoding" : {
        "system" : "urn:iso-astm:E1762-95:2013",
        "code" : "1.2.840.10065.1.12.1.1",
        "display" : "Author's Signature"
      }
    },
    {
      "url" : "signatureValue",
      "valueBase64Binary" : "U0lHTkFUVVJFX1BMQUNFSE9MREVS"
    },
    {
      "url" : "signedBy",
      "valueReference" : {
        "reference" : "Practitioner/example-practitioner-njoroge"
      }
    },
    {
      "url" : "signedOn",
      "valueInstant" : "2025-06-15T09:30:00+03:00"
    }],
    "url" : "https://nshr-uat.sha.go.ke/fhir/StructureDefinition/prescription-digital-signature"
  },
  {
    "extension" : [{
      "url" : "authorizedRefills",
      "valueUnsignedInt" : 3
    },
    {
      "url" : "remainingRefills",
      "valueUnsignedInt" : 3
    },
    {
      "url" : "earliestRefillDate",
      "valueDate" : "2025-07-15"
    }],
    "url" : "https://nshr-uat.sha.go.ke/fhir/StructureDefinition/refill-authorization"
  },
  {
    "extension" : [{
      "url" : "isControlled",
      "valueBoolean" : false
    }],
    "url" : "https://nshr-uat.sha.go.ke/fhir/StructureDefinition/controlled-substance-schedule"
  },
  {
    "extension" : [{
      "url" : "authorizationNumber",
      "valueString" : "SHA-2025-AUTH-001234"
    },
    {
      "url" : "insurerName",
      "valueString" : "Social Health Authority (SHA)"
    },
    {
      "url" : "validFrom",
      "valueDate" : "2025-06-15"
    },
    {
      "url" : "validTo",
      "valueDate" : "2025-09-15"
    }],
    "url" : "https://nshr-uat.sha.go.ke/fhir/StructureDefinition/insurance-pre-authorization"
  }],
  "identifier" : [{
    "system" : "https://ilm-hie.dha.go.ke/fhir/NamingSystem/prescription-identifier",
    "value" : "RX-2025-EXT-00001"
  }],
  "status" : "active",
  "intent" : "order",
  "category" : [{
    "coding" : [{
      "system" : "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
      "code" : "outpatient",
      "display" : "Outpatient"
    }]
  }],
  "medicationCodeableConcept" : {
    "coding" : [{
      "system" : "https://nshr-uat.sha.go.ke/fhir/CodeSystem/generic-products-cs",
      "code" : "GE10002",
      "display" : "Metformin 500 mg Oral Tablet"
    }]
  },
  "subject" : {
    "reference" : "Patient/example-patient-otieno"
  },
  "authoredOn" : "2025-06-15",
  "requester" : {
    "reference" : "Practitioner/example-practitioner-njoroge"
  },
  "dosageInstruction" : [{
    "text" : "Take 1 tablet (500 mg) by mouth twice daily with meals",
    "timing" : {
      "repeat" : {
        "frequency" : 2,
        "period" : 1,
        "periodUnit" : "d"
      }
    },
    "route" : {
      "coding" : [{
        "system" : "https://nshr-uat.sha.go.ke/fhir/CodeSystem/route-of-administration-cs",
        "code" : "RT10025",
        "display" : "Oral"
      }]
    },
    "doseAndRate" : [{
      "doseQuantity" : {
        "value" : 500,
        "unit" : "mg",
        "system" : "http://unitsofmeasure.org",
        "code" : "mg"
      }
    }]
  }],
  "dispenseRequest" : {
    "numberOfRepeatsAllowed" : 3,
    "quantity" : {
      "value" : 60,
      "unit" : "tablet",
      "system" : "http://unitsofmeasure.org",
      "code" : "1"
    }
  },
  "substitution" : {
    "allowedBoolean" : true
  }
}