@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://fhir.hl7.org.vn/core/MedicationRequest/ExampleMedicationRequestYHCTDraft> a fhir:MedicationRequest ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "ExampleMedicationRequestYHCTDraft"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-yhct-outpatient-prescription" ;
       fhir:index -1 ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-yhct-outpatient-prescription>
     ]
  ] ;
  fhir:Resource.language [ fhir:value "vi"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: MedicationRequest ExampleMedicationRequestYHCTDraft</b></p><a name=\"ExampleMedicationRequestYHCTDraft\"> </a><a name=\"hcExampleMedicationRequestYHCTDraft\"> </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-vn-core-yhct-outpatient-prescription.html\">Đơn thuốc cổ truyền ngoại trú VN Core — VN Core Traditional-Medicine Outpatient Prescription Profile</a></p></div><p><b>status</b>: Draft</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>: <a href=\"Medication-ExampleMedicationYHCTHerbal.html\">Bài thuốc Độc hoạt ký sinh thang</a></p><p><b>subject</b>: <a href=\"Patient-ExamplePatientNguyenVanAn.html\">Nguyễn Văn An</a></p><p><b>encounter</b>: <a href=\"Encounter-ExampleEncounterYHCT.html\">Encounter: extension = Đến khám,Đỡ; identifier = Mã lượt khám chữa bệnh: VNMaLuotKCB#LK-2026-03-22-0087; status = finished; class = ambulatory (ActCode#AMB); type = Khám bệnh; period = 2026-03-22 08:00:00+0700 --&gt; 2026-03-22 10:30:00+0700; reasonCode = </a></p><p><b>authoredOn</b>: 2026-03-22 09:30:00+0700</p><p><b>requester</b>: <a href=\"Practitioner-ExamplePractitionerBSCKII.html\">BS.CKII YHCT Nguyễn Thị Lan</a></p><p><b>reasonCode</b>: <span title=\"Codes:{http://fhir.hl7.org.vn/core/CodeSystem/vn-icd10-cs M54.5}\">Yêu thống thể thận hư (đau thắt lưng)</span></p><p><b>groupIdentifier</b>: <a href=\"NamingSystem-vn-prescription-code-ns.html\" title=\"Hệ thống định danh Mã đơn thuốc điện tử — 14 ký tự, ghép từ mã cơ sở KCB (05) + mã đơn (07) + dấu gạch + ký tự loại đơn. Cơ sở bán lẻ thuốc bán theo mã đơn và báo cáo về donthuocquocgia.vn.#xA;#xA;**Ai sinh mã.** Bộ Y tế là cơ quan quản trị cấu trúc mã và Hệ thống đơn thuốc quốc gia, nhưng mã cụ thể do phần mềm nguồn của cơ sở KCB (HIS) tự sinh theo cấu trúc rồi gửi lên: QĐ 808/QĐ-BYT đặt `ma_don_thuoc` trong FormData của request `/api/v1/gui-don-thuoc`, còn TT 26/2025/TT-BYT Phụ lục I chỉ nói mã 'được tạo ra tự động theo cấu trúc quy định' mà không nêu chủ thể. Không mô tả cổng quốc gia như bên cấp phát từng mã.#xA;#xA;**Ký tự loại đơn.** TT 26/2025/TT-BYT: `N` đơn thuốc gây nghiện, `H` đơn thuốc hướng thần/tiền chất, `C` đơn thuốc khác. TT 55/2025/TT-BYT dùng `T` cho đơn thuốc thang. QĐ 808/QĐ-BYT (contract cổng, ban hành trước) dùng bộ `C/N/H/Y` với `Y` cho đơn y học cổ truyền — giá trị legacy ở tầng transport, không dùng cho dữ liệu canonical.#xA;Căn cứ:#xA;- **TT 26/2025/TT-BYT** — kê đơn thuốc hoá dược, sinh phẩm ngoại trú; Điều 12 (liên thông đơn thuốc quốc gia, lĩnh thuốc trong 05 ngày kể từ ngày kê), Phụ lục I (cấu trúc mã đơn thuốc điện tử 14 ký tự); bãi bỏ TT 27/2021/TT-BYT từ 01/07/2025#xA;- **QĐ 808/QĐ-BYT (01/4/2022)** — hướng dẫn kết nối Hệ thống đơn thuốc quốc gia; cấu trúc mã đơn 14 ký tự#xA;- **QĐ 425/QĐ-BYT (05/02/2025)** — Quy chế quản lý, vận hành, sử dụng Hệ thống thông tin Quốc gia về quản lý kê đơn thuốc và bán thuốc theo đơn.\">VNPrescriptionCode</a>/790010000783-T</p><p><b>note</b>: </p><blockquote><div><p>Pháp điều trị: Bổ thận, cường cân cốt, khu phong trừ thấp. Liệu trình 14 thang. Tái khám sau 14 ngày để đánh giá đáp ứng điều trị. Lưu ý: bài thuốc có Ba kích, Đỗ trọng — không dùng khi đang sốt hoặc nhiễm trùng cấp.</p>\n</div></blockquote><h3>DosageInstructions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Sequence</b></td><td><b>Text</b></td><td><b>Timing</b></td><td><b>Route</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td>Sắc uống ngày 1 thang, chia 2 lần (sáng, tối), uống ấm sau ăn 30 phút. Sắc 3 lần nước, hợp lại chia 2.</td><td>Once per 1 day</td><td><span title=\"Codes:{http://snomed.info/sct 26643006}\">Uống (thuốc sắc)</span></td></tr></table><blockquote><p><b>dispenseRequest</b></p><p><b>quantity</b>: 14 thang<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code1 = '1')</span></p><h3>ExpectedSupplyDurations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Value</b></td><td><b>Unit</b></td><td><b>System</b></td><td><b>Code</b></td></tr><tr><td style=\"display: none\">*</td><td>14</td><td>ngày</td><td><a href=\"http://hl7.org/fhir/uv/xver-r5.r4/0.1.0/CodeSystem-v3-ucum.html\">http://unitsofmeasure.org</a></td><td>d</td></tr></table></blockquote></div>"
  ] ;
  fhir:MedicationRequest.status [ fhir:value "draft"] ;
  fhir:MedicationRequest.intent [ fhir:value "order"] ;
  fhir:MedicationRequest.category [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/medicationrequest-category" ] ;
       fhir:Coding.code [ fhir:value "outpatient" ] ;
       fhir:Coding.display [ fhir:value "Outpatient" ]
     ]
  ] ;
  fhir:MedicationRequest.medicationReference [
     fhir:link <http://fhir.hl7.org.vn/core/Medication/ExampleMedicationYHCTHerbal> ;
     fhir:Reference.reference [ fhir:value "Medication/ExampleMedicationYHCTHerbal" ] ;
     fhir:Reference.display [ fhir:value "Bài thuốc Độc hoạt ký sinh thang" ]
  ] ;
  fhir:MedicationRequest.subject [
     fhir:link <http://fhir.hl7.org.vn/core/Patient/ExamplePatientNguyenVanAn> ;
     fhir:Reference.reference [ fhir:value "Patient/ExamplePatientNguyenVanAn" ] ;
     fhir:Reference.display [ fhir:value "Nguyễn Văn An" ]
  ] ;
  fhir:MedicationRequest.encounter [
     fhir:link <http://fhir.hl7.org.vn/core/Encounter/ExampleEncounterYHCT> ;
     fhir:Reference.reference [ fhir:value "Encounter/ExampleEncounterYHCT" ]
  ] ;
  fhir:MedicationRequest.authoredOn [ fhir:value "2026-03-22T09:30:00+07:00"^^xsd:dateTime] ;
  fhir:MedicationRequest.requester [
     fhir:link <http://fhir.hl7.org.vn/core/Practitioner/ExamplePractitionerBSCKII> ;
     fhir:Reference.reference [ fhir:value "Practitioner/ExamplePractitionerBSCKII" ] ;
     fhir:Reference.display [ fhir:value "BS.CKII YHCT Nguyễn Thị Lan" ]
  ] ;
  fhir:MedicationRequest.reasonCode [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://fhir.hl7.org.vn/core/CodeSystem/vn-icd10-cs" ] ;
       fhir:Coding.code [ fhir:value "M54.5" ] ;
       fhir:Coding.display [ fhir:value "Low back pain" ]
     ] ;
     fhir:CodeableConcept.text [ fhir:value "Yêu thống thể thận hư (đau thắt lưng)" ]
  ] ;
  fhir:MedicationRequest.groupIdentifier [
     fhir:Identifier.system [ fhir:value "http://fhir.hl7.org.vn/core/sid/don-thuoc-quoc-gia" ] ;
     fhir:Identifier.value [ fhir:value "790010000783-T" ]
  ] ;
  fhir:MedicationRequest.note [
     fhir:index -1 ;
     fhir:Annotation.text [ fhir:value "Pháp điều trị: Bổ thận, cường cân cốt, khu phong trừ thấp. Liệu trình 14 thang. Tái khám sau 14 ngày để đánh giá đáp ứng điều trị. Lưu ý: bài thuốc có Ba kích, Đỗ trọng — không dùng khi đang sốt hoặc nhiễm trùng cấp." ]
  ] ;
  fhir:MedicationRequest.dosageInstruction [
     fhir:index -1 ;
     fhir:Dosage.sequence [ fhir:value "1"^^xsd:integer ] ;
     fhir:Dosage.text [ fhir:value "Sắc uống ngày 1 thang, chia 2 lần (sáng, tối), uống ấm sau ăn 30 phút. Sắc 3 lần nước, hợp lại chia 2." ] ;
     fhir:Dosage.timing [
       fhir:Timing.repeat [
         fhir:Timing.repeat.frequency [ fhir:value "1"^^xsd:positiveInteger ] ;
         fhir:Timing.repeat.period [ fhir:value "1"^^xsd:decimal ] ;
         fhir:Timing.repeat.periodUnit [ fhir:value "d" ]
       ]
     ] ;
     fhir:Dosage.route [
       fhir:CodeableConcept.coding [
         fhir:index -1 ;
         a sct:26643006 ;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
         fhir:Coding.code [ fhir:value "26643006" ] ;
         fhir:Coding.display [ fhir:value "Oral route" ]
       ] ;
       fhir:CodeableConcept.text [ fhir:value "Uống (thuốc sắc)" ]
     ]
  ] ;
  fhir:MedicationRequest.dispenseRequest [
     fhir:MedicationRequest.dispenseRequest.quantity [
       fhir:Quantity.value [ fhir:value "14"^^xsd:decimal ] ;
       fhir:Quantity.unit [ fhir:value "thang" ] ;
       fhir:Quantity.system [ fhir:value "http://unitsofmeasure.org" ] ;
       fhir:Quantity.code [ fhir:value "1" ]
     ] ;
     fhir:MedicationRequest.dispenseRequest.expectedSupplyDuration [
       fhir:Quantity.value [ fhir:value "14"^^xsd:decimal ] ;
       fhir:Quantity.unit [ fhir:value "ngày" ] ;
       fhir:Quantity.system [ fhir:value "http://unitsofmeasure.org" ] ;
       fhir:Quantity.code [ fhir:value "d" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://fhir.hl7.org.vn/core/MedicationRequest/ExampleMedicationRequestYHCTDraft.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

