SGHI FHIR Profile Implementation Guide
0.1.0 - ci-build
SGHI FHIR Profile Implementation Guide, published by Kathurima Kimathi. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/savannahghi/sil_fhir_profile_ig/ and changes regularly. See the Directory of published versions
| Active as of 2026-09-14 |
@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://hl7.org/fhir/StructureMap/ExtractInpatientShiftHandoverNote> a fhir:StructureMap ; fhir:nodeRole fhir:treeRoot ; fhir:id [ fhir:v "ExtractInpatientShiftHandoverNote"] ; # 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: StructureMap ExtractInpatientShiftHandoverNote</b></p><a name=\"ExtractInpatientShiftHandoverNote\"> </a><a name=\"hcExtractInpatientShiftHandoverNote\"> </a><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/StructureMap/ExtractInpatientShiftHandoverNote'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ExtractInpatientShiftHandoverNote'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Inpatient Shift Handover Note Extraction'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n<span style=\"color: #cc00cc\">/// <b>description</b> = </span><span style=\"color: blue\">'Turns a response to the inpatient shift handover into a single Composition with one section per heading. The outstanding jobs stay narrative here rather than becoming Tasks: the handover form captures them as one free-text block for the incoming shift to read, and splitting one block into Tasks would invent boundaries the writer did not draw. Ward round jobs, which the design does treat as work items, become Tasks in their own map.'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R5/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">" </span><b>alias </b>QR <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R5/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">" </span><b>alias </b>Bundle <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R5/composition.html\" title=\"Composition\">http://hl7.org/fhir/StructureDefinition/Composition</a><span style=\"color: navy\">" </span><b>alias </b>Composition <b>as </b><b>target</b>\r\n\r\n<b>group </b>ExtractInpatientShiftHandoverNote<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>bundle.type = <span style=\"color: blue\">'transaction'</span> <i>"setBundleType"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Composition'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">comp</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span> comp<span style=\"color: navy\">, </span> entry<b> then </b>BuildNoteBase<span style=\"color: navy\">(</span><span style=\"color: maroon\">qr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">entry</span><span style=\"color: navy\">)</span> <i>"noteBase"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>comp.name = <span style=\"color: blue\">'InpatientShiftHandoverNote'</span> <i>"noteName"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>comp.title = <span style=\"color: blue\">'Shift handover'</span> <i>"noteTitle"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">No LOINC document code. The four notes that have one carry it; the other</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">eleven, this one included, have no LOINC concept that means the same</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">thing, so the SGHI document type is the only coding.</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>comp.type<b> as </b><span style=\"color: maroon\">ty</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>ty.coding<b> as </b><span style=\"color: maroon\">sghi</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>sghi.system = <span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/CodeSystem/inpatient-document-type-codesystem'</span> <i>"sghiSystem"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>sghi.code = <span style=\"color: blue\">'shift-handover-note'</span> <i>"sghiCode"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>sghi.display = <span style=\"color: blue\">'Shift handover'</span> <i>"sghiDisplay"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"sghiCoding"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>ty.text = <span style=\"color: blue\">'Shift handover'</span> <i>"typeText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"noteType"</i><span style=\"color: navy\">;</span>\r\n qr.item<b> as </b><span style=\"color: maroon\">it</span><b> where </b><span style=\"color: navy\">(</span>(linkId = 'situation') and answer.value.exists()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -> </b></span>comp.section<b> as </b><span style=\"color: maroon\">sec</span><b> then</b><span style=\"color: navy\"> {\r\n</span> it<span style=\"color: navy\"><b> -> </b></span>sec.title = <span style=\"color: blue\">'Situation'</span> <i>"situationTitle"</i><span style=\"color: navy\">;</span>\r\n it<span style=\"color: navy\"><b> -> </b></span>sec<b> then </b>AddSectionText<span style=\"color: navy\">(</span><span style=\"color: maroon\">it</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">sec</span><span style=\"color: navy\">)</span> <i>"situationText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"situationRule"</i><span style=\"color: navy\">;</span>\r\n qr.item<b> as </b><span style=\"color: maroon\">it</span><b> where </b><span style=\"color: navy\">(</span>(linkId = 'watchFor') and answer.value.exists()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -> </b></span>comp.section<b> as </b><span style=\"color: maroon\">sec</span><b> then</b><span style=\"color: navy\"> {\r\n</span> it<span style=\"color: navy\"><b> -> </b></span>sec.title = <span style=\"color: blue\">'Watch for'</span> <i>"watchForTitle"</i><span style=\"color: navy\">;</span>\r\n it<span style=\"color: navy\"><b> -> </b></span>sec<b> then </b>AddSectionText<span style=\"color: navy\">(</span><span style=\"color: maroon\">it</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">sec</span><span style=\"color: navy\">)</span> <i>"watchForText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"watchForRule"</i><span style=\"color: navy\">;</span>\r\n qr.item<b> as </b><span style=\"color: maroon\">it</span><b> where </b><span style=\"color: navy\">(</span>(linkId = 'outstanding') and answer.value.exists()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -> </b></span>comp.section<b> as </b><span style=\"color: maroon\">sec</span><b> then</b><span style=\"color: navy\"> {\r\n</span> it<span style=\"color: navy\"><b> -> </b></span>sec.title = <span style=\"color: blue\">'Outstanding jobs'</span> <i>"outstandingTitle"</i><span style=\"color: navy\">;</span>\r\n it<span style=\"color: navy\"><b> -> </b></span>sec<b> then </b>AddSectionText<span style=\"color: navy\">(</span><span style=\"color: maroon\">it</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">sec</span><span style=\"color: navy\">)</span> <i>"outstandingText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"outstandingRule"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"composition"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">─────────────────────────────────────────────────────────────────────────────</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Shared note scaffolding. Repeated in each note map rather than imported: the</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">transform engine resolves `imports` against whatever StructureMaps happen to</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">be on the server, and a note that stops extracting because a shared map was</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">not uploaded is a worse failure than a duplicated group.</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">─────────────────────────────────────────────────────────────────────────────</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Two notes on what the publisher's StructureMap validator says about this file.</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Source parameters below are left untyped on purpose. Writing `: Element` makes</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">the validator compare QuestionnaireResponse.item against the literal 'Element'</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">and report them as incompatible with each other, which is noise, not a finding.</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Untyped, it says only that it cannot check the paths.</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">`evaluate(context, expression)` is flagged as "takes 1 parameter but 2 were</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">found". Leave it. The FML parser in the same jar refuses the one-argument form</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">outright -- it wants a parameter, a comma, then the FHIRPath -- so the publisher</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">is objecting to what its own compiler emits. Two arguments is the only form that</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">compiles, and it is what the R5 transform engine executes.</span>\r\n<b>group </b>BuildNoteBase<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">comp</span><span style=\"color: navy\"> : </span>Composition, <b>target</b> <span style=\"color: maroon\">entry</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>comp.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span><b> then </b>SetCompositionFullUrl<span style=\"color: navy\">(</span><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">entry</span><span style=\"color: navy\">)</span> <i>"idAndFullUrl"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>entry.request<b> as </b><span style=\"color: maroon\">request</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>request.method = <span style=\"color: blue\">'POST'</span> <i>"requestMethod"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>request.url = <span style=\"color: blue\">'Composition'</span> <i>"requestUrl"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"entryRequest"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>comp.status = <span style=\"color: blue\">'final'</span> <i>"status"</i><span style=\"color: navy\">;</span>\r\n qr.subject<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -> </b></span>comp.subject = <span style=\"color: maroon\">s</span><span style=\"color: navy\">;</span>\r\n qr.encounter<b> as </b><span style=\"color: maroon\">e</span><span style=\"color: navy\"><b> -> </b></span>comp.encounter = <span style=\"color: maroon\">e</span><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">Composition.date is 1..1. `authored` is only 0..1 on the response, so when a</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">client sends none the extraction time stands in. It is a poor substitute for</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">when the note was written, but a document with no date at all is worse, and</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">extraction happens moments after submission in practice.</span>\r\n qr.authored<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\"><b> -> </b></span>comp.date = <span style=\"color: maroon\">t</span> <i>"date"</i><span style=\"color: navy\">;</span>\r\n qr<b> where </b><span style=\"color: navy\">(</span>authored.exists().not()<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>comp.date = evaluate<span style=\"color: navy\">(</span>qr<span style=\"color: navy\">, </span>now()<span style=\"color: navy\">)</span> <i>"dateFromExtractionTime"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"dateFallback"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">Composition.author is 1..1 minimum. R5 QuestionnaireResponse carries both</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">`author` (who recorded the answers) and `source` (who supplied them); the</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">author is the one who wrote the note, so it wins, and `source` only stands</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">in when the client did not send an author. If the response carries neither,</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">the note comes out unauthored -- there is nothing on a QuestionnaireResponse</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">to invent one from, and guessing at who wrote a clinical note is not a thing</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">a map should do.</span>\r\n qr.author<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -> </b></span>comp.author = <span style=\"color: maroon\">a</span> <i>"authorFromAuthor"</i><span style=\"color: navy\">;</span>\r\n qr<b> where </b><span style=\"color: navy\">(</span>author.exists().not()<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr.source<b> as </b><span style=\"color: maroon\">src</span><span style=\"color: navy\"><b> -> </b></span>comp.author = <span style=\"color: maroon\">src</span> <i>"authorFromSource"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"authorFallback"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">The note is derived from the response, not a copy of it. relatesTo is the</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">only element on R5 Composition that can say so.</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>comp.relatesTo<b> as </b><span style=\"color: maroon\">rel</span><b> then</b><span style=\"color: navy\"> {\r\n</span> qr<span style=\"color: navy\"><b> -> </b></span>rel.type = <span style=\"color: blue\">'derived-from'</span> <i>"relatesToType"</i><span style=\"color: navy\">;</span>\r\n qr<span style=\"color: navy\"><b> -> </b></span>rel.resourceReference = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ref</span><b> then</b><span style=\"color: navy\"> {\r\n</span> <span style=\"color: navy\">// </span><span style=\"color: green\">`qr.id` already resolves to the type-qualified relative reference under</span>\r\n <span style=\"color: navy\">// </span><span style=\"color: green\">this engine, so it is used unprefixed.</span>\r\n qr.id<b> as </b><span style=\"color: maroon\">qid</span><span style=\"color: navy\"><b> -> </b></span>ref.reference = <span style=\"color: maroon\">qid</span> <i>"relatesToRef"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"relatesToTarget"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"linkQuestionnaireResponse"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">The narrative half of a section. The title stays with the caller because a</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">group can only be invoked with variables, not string literals.</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">Two things here are deliberate. `create('xhtml')` rather than assigning the</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">string straight to `div`: the engine hard-casts whatever it is given to</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">XhtmlType, so a plain string fails with a ClassCastException. And</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">`escape('html')` on the answer: a nurse writing "sats < 92% & falling" would</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">otherwise produce a div the server refuses to parse.</span>\r\n<b>group </b>AddSectionText<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">it</span>, <b>target</b> <span style=\"color: maroon\">sec</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> it.answer first<b> as </b><span style=\"color: maroon\">a</span><b> then</b><span style=\"color: navy\"> {\r\n</span> a.value<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span>sec.text<b> as </b><span style=\"color: maroon\">narrative</span><b> then</b><span style=\"color: navy\"> {\r\n</span> v<span style=\"color: navy\"><b> -> </b></span>narrative.status = <span style=\"color: blue\">'generated'</span> <i>"narrativeStatus"</i><span style=\"color: navy\">;</span>\r\n v<span style=\"color: navy\"><b> -> </b></span>narrative.div = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'xhtml'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">xhtml</span><b> then</b><span style=\"color: navy\"> {\r\n</span> v<span style=\"color: navy\"><b> -> </b></span>xhtml.value = evaluate<span style=\"color: navy\">(</span>a<span style=\"color: navy\">, </span>'<div xmlns="http://www.w3.org/1999/xhtml"><p>' + value.toString().escape('html') + '</p></div>'<span style=\"color: navy\">)</span> <i>"narrativeDiv"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"narrativeXhtml"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"sectionText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"sectionAnswer"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>SetCompositionFullUrl<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">comp</span><span style=\"color: navy\"> : </span>Composition, <b>target</b> <span style=\"color: maroon\">entry</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> comp.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -> </b></span>entry.fullUrl = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'https://fhir.slade360.co.ke/fhir/Composition/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">id</span><span style=\"color: navy\">)</span> <i>"assignFullUrl"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"^^rdf:XMLLiteral ] ] ; # fhir:url [ fhir:v "https://fhir.slade360.co.ke/fhir/StructureMap/ExtractInpatientShiftHandoverNote"^^xsd:anyURI] ; # fhir:version [ fhir:v "0.1.0"] ; # fhir:name [ fhir:v "ExtractInpatientShiftHandoverNote"] ; # fhir:title [ fhir:v "Inpatient Shift Handover Note Extraction"] ; # fhir:status [ fhir:v "active"] ; # fhir:date [ fhir:v "2026-09-14T06:31:13+00:00"^^xsd:dateTime] ; # fhir:publisher [ fhir:v "Kathurima Kimathi"] ; # fhir:contact ( [ fhir:name [ fhir:v "Kathurima Kimathi" ] ; fhir:telecom ( [ fhir:system [ fhir:v "url" ] ; fhir:value [ fhir:v "https://www.linkedin.com/in/kathurima-kimathi/" ] ] [ fhir:system [ fhir:v "email" ] ; fhir:value [ fhir:v "kathurimakimathi415@gmail.com" ] ] ) ] [ fhir:name [ fhir:v "Oscar John" ] ; fhir:telecom ( [ fhir:system [ fhir:v "email" ] ; fhir:value [ fhir:v "oscarjohnotieno@gmail.com" ] ; fhir:use [ fhir:v "work" ] ] ) ] [ fhir:name [ fhir:v "Kennedy Omondi" ] ; fhir:telecom ( [ fhir:system [ fhir:v "email" ] ; fhir:value [ fhir:v "kennankole@gmail.com" ] ; fhir:use [ fhir:v "work" ] ] ) ] ) ; # fhir:description [ fhir:v "Turns a response to the inpatient shift handover into a single Composition with one section per heading. The outstanding jobs stay narrative here rather than becoming Tasks: the handover form captures them as one free-text block for the incoming shift to read, and splitting one block into Tasks would invent boundaries the writer did not draw. Ward round jobs, which the design does treat as work items, become Tasks in their own map."] ; # fhir:structure ( [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse> ] ; fhir:mode [ fhir:v "source" ] ; fhir:alias [ fhir:v "QR" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle> ] ; fhir:mode [ fhir:v "target" ] ; fhir:alias [ fhir:v "Bundle" ] ] [ fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Composition"^^xsd:anyURI ; fhir:link <http://hl7.org/fhir/StructureDefinition/Composition> ] ; fhir:mode [ fhir:v "target" ] ; fhir:alias [ fhir:v "Composition" ] ] ) ; # fhir:group ( [ fhir:name [ fhir:v "ExtractInpatientShiftHandoverNote" ] ; fhir:input ( [ fhir:name [ fhir:v "qr" ] ; fhir:type [ fhir:v "QR" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "bundle" ] ; fhir:type [ fhir:v "Bundle" ] ; fhir:mode [ fhir:v "target" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "setBundleType" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "bundle" ] ; fhir:element [ fhir:v "type" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "transaction" ] ] ) ] ) ] [ fhir:name [ fhir:v "composition" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "bundle" ] ; fhir:element [ fhir:v "entry" ] ; fhir:variable [ fhir:v "entry" ] ] [ fhir:context [ fhir:v "entry" ] ; fhir:element [ fhir:v "resource" ] ; fhir:variable [ fhir:v "comp" ] ; fhir:transform [ fhir:v "create" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Composition" ] ] ) ] ) ; fhir:rule ( [ fhir:name [ fhir:v "noteBase" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ] [ fhir:context [ fhir:v "entry" ] ] ) ; fhir:dependent ( [ fhir:name [ fhir:v "BuildNoteBase" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "qr" ] ] [ fhir:value [ a fhir:id ; fhir:v "comp" ] ] [ fhir:value [ a fhir:id ; fhir:v "entry" ] ] ) ] ) ] [ fhir:name [ fhir:v "noteName" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "name" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "InpatientShiftHandoverNote" ] ] ) ] ) ] [ fhir:name [ fhir:v "noteTitle" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "title" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Shift handover" ] ] ) ] ) ] [ fhir:name [ fhir:v "noteType" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "type" ] ; fhir:variable [ fhir:v "ty" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "sghiCoding" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "ty" ] ; fhir:element [ fhir:v "coding" ] ; fhir:variable [ fhir:v "sghi" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "sghiSystem" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sghi" ] ; fhir:element [ fhir:v "system" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "https://fhir.slade360.co.ke/fhir/CodeSystem/inpatient-document-type-codesystem" ] ] ) ] ) ] [ fhir:name [ fhir:v "sghiCode" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sghi" ] ; fhir:element [ fhir:v "code" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "shift-handover-note" ] ] ) ] ) ] [ fhir:name [ fhir:v "sghiDisplay" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sghi" ] ; fhir:element [ fhir:v "display" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Shift handover" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "typeText" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "ty" ] ; fhir:element [ fhir:v "text" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Shift handover" ] ] ) ] ) ] ) ; fhir:documentation [ fhir:v "No LOINC document code. The four notes that have one carry it; the other\r\neleven, this one included, have no LOINC concept that means the same\r\nthing, so the SGHI document type is the only coding." ] ] [ fhir:name [ fhir:v "situationRule" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "it" ] ; fhir:condition [ fhir:v "(linkId = 'situation') and answer.value.exists()" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "section" ] ; fhir:variable [ fhir:v "sec" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "situationTitle" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ; fhir:element [ fhir:v "title" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Situation" ] ] ) ] ) ] [ fhir:name [ fhir:v "situationText" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ] ) ; fhir:dependent ( [ fhir:name [ fhir:v "AddSectionText" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "it" ] ] [ fhir:value [ a fhir:id ; fhir:v "sec" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "watchForRule" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "it" ] ; fhir:condition [ fhir:v "(linkId = 'watchFor') and answer.value.exists()" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "section" ] ; fhir:variable [ fhir:v "sec" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "watchForTitle" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ; fhir:element [ fhir:v "title" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Watch for" ] ] ) ] ) ] [ fhir:name [ fhir:v "watchForText" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ] ) ; fhir:dependent ( [ fhir:name [ fhir:v "AddSectionText" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "it" ] ] [ fhir:value [ a fhir:id ; fhir:v "sec" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "outstandingRule" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "item" ] ; fhir:variable [ fhir:v "it" ] ; fhir:condition [ fhir:v "(linkId = 'outstanding') and answer.value.exists()" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "section" ] ; fhir:variable [ fhir:v "sec" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "outstandingTitle" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ; fhir:element [ fhir:v "title" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Outstanding jobs" ] ] ) ] ) ] [ fhir:name [ fhir:v "outstandingText" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ] ) ; fhir:dependent ( [ fhir:name [ fhir:v "AddSectionText" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "it" ] ] [ fhir:value [ a fhir:id ; fhir:v "sec" ] ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "BuildNoteBase" ] ; fhir:documentation [ fhir:v "─────────────────────────────────────────────────────────────────────────────\r\nShared note scaffolding. Repeated in each note map rather than imported: the\r\ntransform engine resolves `imports` against whatever StructureMaps happen to\r\nbe on the server, and a note that stops extracting because a shared map was\r\nnot uploaded is a worse failure than a duplicated group.\r\n─────────────────────────────────────────────────────────────────────────────\r\nTwo notes on what the publisher's StructureMap validator says about this file.\r\nSource parameters below are left untyped on purpose. Writing `: Element` makes\r\nthe validator compare QuestionnaireResponse.item against the literal 'Element'\r\nand report them as incompatible with each other, which is noise, not a finding.\r\nUntyped, it says only that it cannot check the paths.\r\n`evaluate(context, expression)` is flagged as \"takes 1 parameter but 2 were\r\nfound\". Leave it. The FML parser in the same jar refuses the one-argument form\r\noutright -- it wants a parameter, a comma, then the FHIRPath -- so the publisher\r\nis objecting to what its own compiler emits. Two arguments is the only form that\r\ncompiles, and it is what the R5 transform engine executes." ] ; fhir:input ( [ fhir:name [ fhir:v "qr" ] ; fhir:type [ fhir:v "QR" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "comp" ] ; fhir:type [ fhir:v "Composition" ] ; fhir:mode [ fhir:v "target" ] ] [ fhir:name [ fhir:v "entry" ] ; fhir:mode [ fhir:v "target" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "idAndFullUrl" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "id" ] ; fhir:transform [ fhir:v "uuid" ] ] ) ; fhir:dependent ( [ fhir:name [ fhir:v "SetCompositionFullUrl" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "comp" ] ] [ fhir:value [ a fhir:id ; fhir:v "entry" ] ] ) ] ) ] [ fhir:name [ fhir:v "entryRequest" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "entry" ] ; fhir:element [ fhir:v "request" ] ; fhir:variable [ fhir:v "request" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "requestMethod" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "request" ] ; fhir:element [ fhir:v "method" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "POST" ] ] ) ] ) ] [ fhir:name [ fhir:v "requestUrl" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "request" ] ; fhir:element [ fhir:v "url" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Composition" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "status" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "final" ] ] ) ] ) ] [ fhir:name [ fhir:v "subject" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "subject" ] ; fhir:variable [ fhir:v "s" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "subject" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "s" ] ] ) ] ) ] [ fhir:name [ fhir:v "encounter" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "encounter" ] ; fhir:variable [ fhir:v "e" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "encounter" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "e" ] ] ) ] ) ] [ fhir:name [ fhir:v "date" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "authored" ] ; fhir:variable [ fhir:v "t" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "date" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "t" ] ] ) ] ) ; fhir:documentation [ fhir:v "Composition.date is 1..1. `authored` is only 0..1 on the response, so when a\r\nclient sends none the extraction time stands in. It is a poor substitute for\r\nwhen the note was written, but a document with no date at all is worse, and\r\nextraction happens moments after submission in practice." ] ] [ fhir:name [ fhir:v "dateFallback" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:condition [ fhir:v "authored.exists().not()" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "dateFromExtractionTime" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "date" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "qr" ] ] [ fhir:value [ a fhir:string ; fhir:v "now()" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "authorFromAuthor" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "author" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "author" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "a" ] ] ) ] ) ; fhir:documentation [ fhir:v "Composition.author is 1..1 minimum. R5 QuestionnaireResponse carries both\r\n`author` (who recorded the answers) and `source` (who supplied them); the\r\nauthor is the one who wrote the note, so it wins, and `source` only stands\r\nin when the client did not send an author. If the response carries neither,\r\nthe note comes out unauthored -- there is nothing on a QuestionnaireResponse\r\nto invent one from, and guessing at who wrote a clinical note is not a thing\r\na map should do." ] ] [ fhir:name [ fhir:v "authorFallback" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:condition [ fhir:v "author.exists().not()" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "authorFromSource" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "source" ] ; fhir:variable [ fhir:v "src" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "author" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "src" ] ] ) ] ) ] ) ] [ fhir:name [ fhir:v "linkQuestionnaireResponse" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "relatesTo" ] ; fhir:variable [ fhir:v "rel" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "relatesToType" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "rel" ] ; fhir:element [ fhir:v "type" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "derived-from" ] ] ) ] ) ] [ fhir:name [ fhir:v "relatesToTarget" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "rel" ] ; fhir:element [ fhir:v "resourceReference" ] ; fhir:variable [ fhir:v "ref" ] ; fhir:transform [ fhir:v "create" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "Reference" ] ] ) ] ) ; fhir:rule ( [ fhir:name [ fhir:v "relatesToRef" ] ; fhir:source ( [ fhir:context [ fhir:v "qr" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "qid" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "ref" ] ; fhir:element [ fhir:v "reference" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "qid" ] ] ) ] ) ; fhir:documentation [ fhir:v "`qr.id` already resolves to the type-qualified relative reference under\r\nthis engine, so it is used unprefixed." ] ] ) ] ) ; fhir:documentation [ fhir:v "The note is derived from the response, not a copy of it. relatesTo is the\r\nonly element on R5 Composition that can say so." ] ] ) ] [ fhir:name [ fhir:v "AddSectionText" ] ; fhir:documentation [ fhir:v "The narrative half of a section. The title stays with the caller because a\r\ngroup can only be invoked with variables, not string literals.\r\nTwo things here are deliberate. `create('xhtml')` rather than assigning the\r\nstring straight to `div`: the engine hard-casts whatever it is given to\r\nXhtmlType, so a plain string fails with a ClassCastException. And\r\n`escape('html')` on the answer: a nurse writing \"sats < 92% & falling\" would\r\notherwise produce a div the server refuses to parse." ] ; fhir:input ( [ fhir:name [ fhir:v "it" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "sec" ] ; fhir:mode [ fhir:v "target" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "sectionAnswer" ] ; fhir:source ( [ fhir:context [ fhir:v "it" ] ; fhir:element [ fhir:v "answer" ] ; fhir:listMode [ fhir:v "first" ] ; fhir:variable [ fhir:v "a" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "sectionText" ] ; fhir:source ( [ fhir:context [ fhir:v "a" ] ; fhir:element [ fhir:v "value" ] ; fhir:variable [ fhir:v "v" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "sec" ] ; fhir:element [ fhir:v "text" ] ; fhir:variable [ fhir:v "narrative" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "narrativeStatus" ] ; fhir:source ( [ fhir:context [ fhir:v "v" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "narrative" ] ; fhir:element [ fhir:v "status" ] ; fhir:transform [ fhir:v "copy" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "generated" ] ] ) ] ) ] [ fhir:name [ fhir:v "narrativeXhtml" ] ; fhir:source ( [ fhir:context [ fhir:v "v" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "narrative" ] ; fhir:element [ fhir:v "div" ] ; fhir:variable [ fhir:v "xhtml" ] ; fhir:transform [ fhir:v "create" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "xhtml" ] ] ) ] ) ; fhir:rule ( [ fhir:name [ fhir:v "narrativeDiv" ] ; fhir:source ( [ fhir:context [ fhir:v "v" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "xhtml" ] ; fhir:element [ fhir:v "value" ] ; fhir:transform [ fhir:v "evaluate" ] ; fhir:parameter ( [ fhir:value [ a fhir:id ; fhir:v "a" ] ] [ fhir:value [ a fhir:string ; fhir:v "'<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>' + value.toString().escape('html') + '</p></div>'" ] ] ) ] ) ] ) ] ) ] ) ] ) ] [ fhir:name [ fhir:v "SetCompositionFullUrl" ] ; fhir:input ( [ fhir:name [ fhir:v "comp" ] ; fhir:type [ fhir:v "Composition" ] ; fhir:mode [ fhir:v "source" ] ] [ fhir:name [ fhir:v "entry" ] ; fhir:mode [ fhir:v "target" ] ] ) ; fhir:rule ( [ fhir:name [ fhir:v "assignFullUrl" ] ; fhir:source ( [ fhir:context [ fhir:v "comp" ] ; fhir:element [ fhir:v "id" ] ; fhir:variable [ fhir:v "id" ] ] ) ; fhir:target ( [ fhir:context [ fhir:v "entry" ] ; fhir:element [ fhir:v "fullUrl" ] ; fhir:transform [ fhir:v "append" ] ; fhir:parameter ( [ fhir:value [ a fhir:string ; fhir:v "https://fhir.slade360.co.ke/fhir/Composition/" ] ] [ fhir:value [ a fhir:id ; fhir:v "id" ] ] ) ] ) ] ) ] ) . #
IG © 2025+ Kathurima Kimathi. Package silfhirprofileig#0.1.0 based on FHIR 5.0.0. Generated 2026-09-14
Links: Table of Contents |
QA Report