{
  "resourceType": "StructureDefinition",
  "id": "medication-request-profile",
  "url": "https://example.org/fhir/StructureDefinition/MedicationRequestProfile",
  "name": "MedicationRequestProfile",
  "title": "藥物處方",
  "status": "draft",
  "description": "藥物處方 Profile，包含必要欄位及處方類別限制",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.status",
        "path": "MedicationRequest.status",
        "definition": "處方當前狀態，如 active（有效）、completed（已完成）"
      },
      {
        "id": "MedicationRequest.intent",
        "path": "MedicationRequest.intent",
        "definition": "此處方的意圖，僅限 order（醫囑）。",
        "fixedCode": "order"
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "short": "記錄處方的藥品資訊",
        "definition": "所處方的藥物，可使用 Reference(Medication) 或 CodeableConcept 記錄藥名"
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "short": "病人",
        "definition": "開立處方的病人。",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "short": "處方開立的日期",
        "definition": "記錄此處方的開立日期，需符合 ISO 8601 日期格式 (YYYY-MM-DD)。",
        "min": 1
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "short": "開立者",
        "definition": "開立處方的醫師或醫療機構。",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      }
    ]
  }
}