@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://fhir.hl7.org.vn/core/Task/ExampleTaskPrescriptionDispensePartial> a fhir:Task ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "ExampleTaskPrescriptionDispensePartial"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-task" ;
       fhir:index -1 ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-task>
     ]
  ] ;
  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: Task ExampleTaskPrescriptionDispensePartial</b></p><a name=\"ExampleTaskPrescriptionDispensePartial\"> </a><a name=\"hcExampleTaskPrescriptionDispensePartial\"> </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-task.html\">Công việc điều phối VN Core — VN Core Task Profile</a></p></div><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>/790010000451-C</p><p><b>status</b>: In Progress</p><p><b>businessStatus</b>: <span title=\"Codes:{http://fhir.hl7.org.vn/core/CodeSystem/vn-task-business-status-cs RX-PARTIAL}\">Đã cấp phát một phần</span></p><p><b>intent</b>: order</p><p><b>priority</b>: Routine</p><p><b>code</b>: <span title=\"Codes:{http://hl7.org/fhir/CodeSystem/task-code fulfill}\">Cấp phát, bán thuốc theo đơn</span></p><p><b>focus</b>: <a href=\"MedicationRequest-ExampleMedicationRequestAmoxicillin.html\">MedicationRequest: status = active; intent = order; category = Outpatient; medication[x] = Amoxicillin; authoredOn = 2026-03-19 09:30:00+0700; reasonCode = Pneumonia, unspecified; groupIdentifier = http://fhir.hl7.org.vn/core/sid/don-thuoc-quoc-gia#VNPrescriptionCode#790010000451-C; note = Đã đối chiếu tiền sử tại thời điểm kê đơn: không ghi nhận dị ứng Penicillin hoặc thuốc nhóm beta-lactam. Tái khám sau 7 ngày nếu không đỡ.</a></p><p><b>for</b>: <a href=\"Patient-ExamplePatientNguyenVanAn.html\">Nguyễn Văn An Male, DoB: 1985-03-15 ( Căn cước công dân: VNCCCD#001085012345)</a></p><p><b>executionPeriod</b>: 2026-03-19 13:50:00+0700 --&gt; (ongoing)</p><p><b>authoredOn</b>: 2026-03-19 09:35:00+0700</p><p><b>lastModified</b>: 2026-03-19 14:00:00+0700</p><p><b>requester</b>: <a href=\"Practitioner-ExamplePractitionerBSCKII.html\">Practitioner Nguyễn Thị Lan</a></p><p><b>owner</b>: <a href=\"Organization-ExampleOrganizationRetailPharmacy.html\">Organization Nhà thuốc Bệnh viện Chợ Rẫy</a></p><h3>Restrictions</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td>2026-03-19 09:30:00+0700 --&gt; 2026-03-24 23:59:59+0700</td></tr></table><h3>Outputs</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Value[x]</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:\">Phiếu cấp phát một phần đã lập</span></td><td><a href=\"MedicationDispense-ExampleMedicationDispensePartialAmoxicillin.html\">MedicationDispense: status = completed; category = Community; medication[x] = -&gt;Medication Amoxicillin; quantity = 7 viên; whenHandedOver = 2026-03-19 14:00:00+0700</a></td></tr></table></div>"
  ] ;
  fhir:Task.groupIdentifier [
     fhir:Identifier.system [ fhir:value "http://fhir.hl7.org.vn/core/sid/don-thuoc-quoc-gia" ] ;
     fhir:Identifier.value [ fhir:value "790010000451-C" ]
  ] ;
  fhir:Task.status [ fhir:value "in-progress"] ;
  fhir:Task.businessStatus [
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://fhir.hl7.org.vn/core/CodeSystem/vn-task-business-status-cs" ] ;
       fhir:Coding.code [ fhir:value "RX-PARTIAL" ] ;
       fhir:Coding.display [ fhir:value "Đã cấp phát một phần" ]
     ]
  ] ;
  fhir:Task.intent [ fhir:value "order"] ;
  fhir:Task.priority [ fhir:value "routine"] ;
  fhir:Task.code [
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://hl7.org/fhir/CodeSystem/task-code" ] ;
       fhir:Coding.code [ fhir:value "fulfill" ] ;
       fhir:Coding.display [ fhir:value "Fulfill the focal request" ]
     ] ;
     fhir:CodeableConcept.text [ fhir:value "Cấp phát, bán thuốc theo đơn" ]
  ] ;
  fhir:Task.focus [
     fhir:link <http://fhir.hl7.org.vn/core/MedicationRequest/ExampleMedicationRequestAmoxicillin> ;
     fhir:Reference.reference [ fhir:value "MedicationRequest/ExampleMedicationRequestAmoxicillin" ]
  ] ;
  fhir:Task.for [
     fhir:link <http://fhir.hl7.org.vn/core/Patient/ExamplePatientNguyenVanAn> ;
     fhir:Reference.reference [ fhir:value "Patient/ExamplePatientNguyenVanAn" ]
  ] ;
  fhir:Task.executionPeriod [
     fhir:Period.start [ fhir:value "2026-03-19T13:50:00+07:00"^^xsd:dateTime ]
  ] ;
  fhir:Task.authoredOn [ fhir:value "2026-03-19T09:35:00+07:00"^^xsd:dateTime] ;
  fhir:Task.lastModified [ fhir:value "2026-03-19T14:00:00+07:00"^^xsd:dateTime] ;
  fhir:Task.requester [
     fhir:link <http://fhir.hl7.org.vn/core/Practitioner/ExamplePractitionerBSCKII> ;
     fhir:Reference.reference [ fhir:value "Practitioner/ExamplePractitionerBSCKII" ]
  ] ;
  fhir:Task.owner [
     fhir:link <http://fhir.hl7.org.vn/core/Organization/ExampleOrganizationRetailPharmacy> ;
     fhir:Reference.reference [ fhir:value "Organization/ExampleOrganizationRetailPharmacy" ]
  ] ;
  fhir:Task.restriction [
     fhir:Task.restriction.period [
       fhir:Period.start [ fhir:value "2026-03-19T09:30:00+07:00"^^xsd:dateTime ] ;
       fhir:Period.end [ fhir:value "2026-03-24T23:59:59+07:00"^^xsd:dateTime ]
     ]
  ] ;
  fhir:Task.output [
     fhir:index -1 ;
     fhir:Task.output.type [
       fhir:CodeableConcept.text [ fhir:value "Phiếu cấp phát một phần đã lập" ]
     ] ;
     fhir:Task.output.valueReference [
       fhir:link <http://fhir.hl7.org.vn/core/MedicationDispense/ExampleMedicationDispensePartialAmoxicillin> ;
       fhir:Reference.reference [ fhir:value "MedicationDispense/ExampleMedicationDispensePartialAmoxicillin" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://fhir.hl7.org.vn/core/Task/ExampleTaskPrescriptionDispensePartial.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

