Social Care Interoperability Platform FHIR Implementation Guide
Version: 0.1.0, Status: draft
Social Care Interoperability Platform FHIR Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Official URL: https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/Flag-Alert | Version: 0.1.0 | |||
| Draft as of 2026-06-10 | Computable Name: FlagToAlert | |||
map "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureMap/Flag-Alert" = "FlagToAlert" uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Flag" alias Flag as source uses "https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/MODS-Alert" alias Alert as target group Alert(source src : Flag, target tgt : Alert) { src -> tgt.id = evaluate(src, id) "e1b007ab-9eb9-4a69-80f8-52ea9d830f6a"; src -> tgt.meta as meta, meta.dataClass as dataClass then { src -> dataClass.name = 'Alert' "94be0f8b-133c-4542-82f3-8cfebfe0863e"; } "setDataClassName"; src.subject as subject then { src -> tgt.subjectOfCare as subjectOfCare then { src -> subjectOfCare.id = evaluate(subject, reference.replace('Patient/','')) "9b8d0410-c3a4-44f0-8e98-a31502317617"; src -> subjectOfCare.type = 'SubjectOfCare' "dee0d4ba-13d8-4a60-83e5-768d9cf63711"; src -> subjectOfCare.display = evaluate(subject, display) "cdcc7cfd-5b38-4166-91ea-ba64195a5356"; } "9213e8a1-8c64-466a-a444-17a56b7d7e5a"; } "setAlertSubject"; src.status as status then { src -> src.statusCode as statusCode then { src -> statusCode.code = status "cedfdf5a-91fa-4f69-a9b2-2f8b3b6cdb4a"; src -> statusCode.system = 'http://hl7.org/fhir/flag-status' "075657e2-0873-410d-8327-e4223337c735"; src -> tgt.status = translate(statusCode, 'https://metadata.phase2.scip.synanetics.cloud/fhir/r4/ConceptMap/MODS-FHIRStatus-1', 'Coding') "00a301cf-bc9d-441c-a680-9cb5ec3b9240"; } "setAlertStatus"; src.category as category -> src.cats as cats then { cats as c then { category -> c.code = evaluate(category, coding.code) "ab1ae440-9c62-4c83-84cc-ba058655420f"; category -> c.display = evaluate(category, coding.display) "bf62cd92-f7a8-4f41-ae55-a4424ee17a32"; } "efacbe99-c0c5-4be8-adef-6ed673bf66d8"; cats -> tgt.category "af61ade2-b069-45fe-87cd-3ae1d7eac8d4"; } "setAlertCategory"; src.extension as participantsExt where $this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor' -> tgt.informed as informed then { participantsExt.extension as informedParticipants where $this.url='participantRole'and$this.valueCode='informed' then { participantsExt.extension as informedParticipantReferences where $this.url='participantReference' then { informedParticipantReferences.valueReference as informedParticipantRef then { src -> informed.id = evaluate(informedParticipantRef, reference.replace('Practitioner/','')) "75181156-fe62-4dc7-a87e-e220f16c9eaa"; src -> informed.type = 'CareWorker' "6404bc28-20c9-416d-af98-6899122a4a47"; src -> informed.display = evaluate(informedParticipantRef, display) "666f21fe-52b5-4ef9-9893-a58d3c11ee0a"; }; }; }; } "setAlertInformed"; src.code as code then { src -> tgt.text = evaluate(src, code.text) "36c6afea-253d-48c7-8963-8ccf330a6c89"; } "setAlertCodedText"; src.period as period then { period.start as start then { src -> tgt.startDate = evaluate(period, start) "b3ec2480-cd28-41b0-a4a5-904d66ab53bb"; }; period.end as end then { src -> tgt.endDate = evaluate(period, end) "a6762921-33d9-46c9-a122-834d83f37dc9"; }; } "setAlertStartEndDates"; src.extension as participantsExt where $this.url='https://metadata.phase2.scip.synanetics.cloud/fhir/r4/StructureDefinition/Extension-MODS-ParticipantCareActor' -> tgt.involved as involved then { participantsExt.extension as involvedParticipants where $this.url='participantRole'and$this.valueCode='involved' then { participantsExt.extension as involvedParticipantReferences where $this.url='participantReference' then { involvedParticipantReferences.valueReference as involvedParticipantRef then { src -> involved.id = evaluate(involvedParticipantRef, reference.replace('Practitioner/','')) "0643719d-d152-481d-a66e-3f8c105fef45"; src -> involved.type = 'CareWorker' "108bb7a8-d068-4d17-868e-718b955261f3"; src -> involved.display = evaluate(involvedParticipantRef, display) "eff44493-5a20-492c-b6bb-2ed3d1c753db"; }; }; }; } "setAlertInvolved"; }; }