@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@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/OperationDefinition/vn-generate-ips-summary> a fhir:OperationDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "vn-generate-ips-summary"] ; # 
  fhir:language [ fhir:v "vi"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition vn-generate-ips-summary</b></p><a name=\"vn-generate-ips-summary\"> </a><a name=\"hcvn-generate-ips-summary\"> </a><p>URL: [base]/Patient/[id]/$summary</p><h3>Parameters</h3><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>identifier</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>Định danh người bệnh (CCCD/số định danh) thay cho id logic nếu cần.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></td><td/><td><div><p>IPS document Bundle theo profile <code>VNCoreBundleIPS</code> (kế thừa <code>Bundle-uv-ips</code>): <code>type=document</code>, <code>entry[0]</code> là <code>VNCoreCompositionIPS</code>, kèm Patient + resource lâm sàng (mã SNOMED CT/ICD-10). Xem ví dụ <code>ExampleBundleIPSNguyenVanAn</code>. (R4 OperationDefinition không có <code>parameter.profile</code> để ràng buộc hình thức cho kiểu Bundle; profile <code>VNCoreBundleIPS</code> là hợp đồng kết quả.) Lỗi trả về <code>OperationOutcome</code> chuẩn FHIR.</p>\n</div></td></tr></table><div><p>Gọi trên một Patient cụ thể: GET [base]/Patient/[id]/$summary. Server xây dựng IPS document Bundle (VNCoreCompositionIPS) bằng cách ánh xạ AllergyIntolerance/Condition/MedicationStatement... của VN Core sang IPS profile + mã SNOMED CT. Có thể cache/precompute (VNeID display projection) để chịu tải.</p>\n</div></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:url [
     fhir:v "http://fhir.hl7.org.vn/core/OperationDefinition/vn-generate-ips-summary"^^xsd:anyURI ;
     fhir:l <http://fhir.hl7.org.vn/core/OperationDefinition/vn-generate-ips-summary>
  ] ; # 
  fhir:version [ fhir:v "0.6.0"] ; # 
  fhir:name [ fhir:v "VNGenerateIPSSummary"] ; # 
  fhir:title [ fhir:v "$summary — Sinh Sổ SKĐT bản IPS quốc tế (VN Core IPS Summary)"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:kind [ fhir:v "operation"] ; # 
  fhir:date [ fhir:v "2026-06-10T07:15:44+07:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "Omi HealthTech / VN Core FHIR Community Initiative"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "Omi HealthTech / VN Core FHIR Community Initiative" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://hl7.org.vn" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "info@hl7.org.vn" ]
     ] )
  ] [
     fhir:name [ fhir:v "Omi HealthTech (OmiGroup)" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://omihealthtech.vn" ]
     ] [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "https://omigroup.vn" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "info@hl7.org.vn" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Operation `$summary` sinh **bản tóm tắt sức khỏe theo chuẩn IPS** (International Patient Summary) cho một người bệnh, từ dữ liệu nội địa (Sổ SKĐT VNeID + các resource lâm sàng VN Core). Đầu ra là một **document Bundle** với `VNCoreCompositionIPS` ở entry đầu, các resource IPS-profiled (mã SNOMED CT qua VNSNOMEDSubsetCS). Đây là điểm projection của kiến trúc dual-profile: nội địa (QĐ 1332) → quốc tế (IPS). Tương thích `Patient/[id]/$summary` của HL7 IPS + HAPI FHIR IIpsGenerationStrategy."] ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ;
         fhir:l <urn:iso:std:iso:3166>
       ] ;
       fhir:code [ fhir:v "VN" ] ;
       fhir:display [ fhir:v "Viet Nam" ]
     ] )
  ] ) ; # 
  fhir:affectsState [ fhir:v false] ; # 
  fhir:code [ fhir:v "summary"] ; # 
  fhir:comment [ fhir:v "Gọi trên một Patient cụ thể: GET [base]/Patient/[id]/$summary. Server xây dựng IPS document Bundle (VNCoreCompositionIPS) bằng cách ánh xạ AllergyIntolerance/Condition/MedicationStatement... của VN Core sang IPS profile + mã SNOMED CT. Có thể cache/precompute (VNeID display projection) để chịu tải."] ; # 
  fhir:resource ( [ fhir:v "Patient"] ) ; # 
  fhir:system [ fhir:v false] ; # 
  fhir:type [ fhir:v false] ; # 
  fhir:instance [ fhir:v true] ; # 
  fhir:parameter ( [
     fhir:name [ fhir:v "identifier" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v 0 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "Định danh người bệnh (CCCD/số định danh) thay cho id logic nếu cần." ] ;
     fhir:type [ fhir:v "Identifier" ]
  ] [
     fhir:name [ fhir:v "return" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v 1 ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "IPS document Bundle theo profile `VNCoreBundleIPS` (kế thừa `Bundle-uv-ips`): `type=document`, `entry[0]` là `VNCoreCompositionIPS`, kèm Patient + resource lâm sàng (mã SNOMED CT/ICD-10). Xem ví dụ `ExampleBundleIPSNguyenVanAn`. (R4 OperationDefinition không có `parameter.profile` để ràng buộc hình thức cho kiểu Bundle; profile `VNCoreBundleIPS` là hợp đồng kết quả.) Lỗi trả về `OperationOutcome` chuẩn FHIR." ] ;
     fhir:type [ fhir:v "Bundle" ]
  ] ) . # 

# -------------------------------------------------------------------------------------

