SFM Basis API Implementation Guide

Example MedicationComposition

{
    "resourceType":"Composition",
    "id":"642258",
    "meta":{
        "profile": [
            "http://ehelse.no/fhir/StructureDefinition/sfm-MedicationComposition"
        ]
    },
    "status":"final",
    "type":{
        "coding": [
            {
                "system":"http://loinc.org",
                "code":"11503-0",
                "display":"Medicinal records"
            }
        ]
    },
    "subject":{
        "reference":"urn:uuid:04121321-4af5-424c-a0e1-1c349ded3aab"
    },
    "date":"2020-04-12T15:19:00+02:00",
    "author": [
        {
            "reference":"Practitioner/12345"
        }
    ],
    "title":"Medication summary",
    "confidentiality":"N",
    "attester": [
        {
            "mode": [
                "legal"
            ],
            "time":"2017-07-20T14:30:00+01:00",
            "party":{
                "reference":"Practitioner/12345"
            }
        },
        {
            "mode": [
                "official"
            ],
            "time":"2017-07-20T14:30:00+01:00",
            "party":{
                "reference":"Organization/54321"
            }
        }
    ],
   
    "section": [
        {
            "title":"PPL info",
            "code":{
                "coding": [
                    {
                        "system":"http://ehelse.no/fhir/CodeSystem/sfm-section-types",
                        "code":"sectionPLLinfo",
                        "display":"PLL Info"
                    }
                ]
            },
            "text":{
                "status":"generated",
                "div":"<xhtml:div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">Info reated to M25</xhtml:div>"
            },
            "entry": [
                {
                    "reference":"urn:uuid:<UUID of sfm-PLL-info resource in outer bundle>"
                }
            ]
        },
        {
            "title":"Medication",
            "code":{
                "coding": [
                    {
                        "system":"http://ehelse.no/fhir/CodeSystem/sfm-section-types",
                        "code":"sectionMedication",
                        "display":"List of Medication statements"
                    }
                ]
            },
            "text":{
                "status":"generated",
               "div":"<xhtml:div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">List of medications</xhtml:div>"
            },
            "entry": [
                {
                    "reference":"urn:uuid:<UUID of medication statement 1>"
                },
                {
                    "reference":"urn:uuid:<UUID of medication statement 2>"
                },
                {
                    "reference":"urn:uuid:<UUID of medication statement 3>"
                }
            ]
        },
        {
            "title":"Other prescriptions",
            "code":{
                "coding": [
                    {
                        "system":"http://ehelse.no/fhir/CodeSystem/sfm-section-types",
                        "code":"sectionOtherPrescriptions",
                        "display":"List of non medical prescriptions"
                    }
                ]
            },
            "text":{
                "status":"generated",
                "div":"<xhtml:div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">List of non medical prescriptions</xhtml:div>"
            },
            "entry": [
                {
                    "reference":"urn:uuid:<UUID of non-medical prescription 3>"
                },
                {
                    "reference":"urn:uuid:<UUID of non-medical prescription 2>"
                }
            ]
        },
        {
            "title":"Allergies",
            "code":{
                "coding": [
                    {
                        "system":"http://ehelse.no/fhir/CodeSystem/sfm-section-types",
                        "code":"sectionAllergies",
                        "display":"Section allergies"
                    }
                ]
            },
            "text":{
                "status":"generated",
                "div":"<xhtml:div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">List of allergies</xhtml:div>"
            },
            "entry": [
                
                {
                    "reference":"urn:uuid:<UUID of KjAllergyIntolerance>"
                }
            ]
        },
        {
            "title":"Dispence",
            "code":{
                "coding": [
                    {
                        "system":"http://ehelse.no/fhir/CodeSystem/sfm-section-types",
                        "code":"sectionDispense",
                        "display":"Section dispense"
                    }
                ]
            },
            "text":{
                "status":"generated",
                "div":"<xhtml:div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">List of dispense messages</xhtml:div>"
            },
            "entry": [
                {
                    "reference":"urn:uuid:<UUID of Sfm-MedicationDispense 1>"
                },
                {
                    "reference":"urn:uuid:<UUID of Sfm-MedicationDispense 2>"
                },
                {
                    "reference":"urn:uuid:<UUID of Sfm-MedicationDispense 3>"
                },
                               {
                    "reference":"urn:uuid:<UUID of Sfm-GeneralDispense 1>"
                },
                {
                    "reference":"urn:uuid:<UUID of Sfm-GeneralDispense 1>"
                },

            ]
        }        
    ]
}