ePMA Implementation Guidance for FHIR STU3

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.
Please note: This guidance has been superseded by the Implementation guide for digitial medicines, which contains up-to-date information.

Scenario: Self-Declared

Add an example of a patient self-declared medication, e.g. a OTC medication like Paracetamol.

MedicationStatement

<!--  This xml example is for illustrative purposes only and has not been clinically verified.  -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="921dacdd-3a3b-4649-ab03-f0b219486bc4" />
    <type value="message" />
    <!--         Message Header         -->
    <entry>
        <fullUrl value="message-header-167434" />
        <resource>
            <MessageHeader>
                <id value="message-header-167434" />
                <text>
                    <status value="generated" />
                    <div xmlns="http://www.w3.org/1999/xhtml"><p>The quick brown fox jumps over the lazy dog</p></div>
                </text>
                <event>
                    <system value="https://fhir.nhs.uk/STU3/CodeSystem/EventType-1" />
                    <code value="individual-requirements-1" />
                    <display value="Individual Requirements" />
                </event>
                <timestamp value="2021-05-07T16:15:32Z" />
                <source>
                    <endpoint value="nhs-uk:addressing:ods:T48NT" />
                </source>
                <focus>
                    <reference value="med-statement-123123124456" />
                </focus>
            </MessageHeader>
        </resource>
    </entry>
    <!--  Patient associated with the encounter.  -->
    <entry>
        <fullUrl value="patient-01020305" />
        <resource>
            <Patient>
                <id value="patient-01020305" />
                <identifier>
                    <extension url="https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1">
                        <valueCodeableConcept>
                            <coding>
                                <system value="https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1" />
                                <code value="01" />
                                <display value="Number present and verified" />
                            </coding>
                        </valueCodeableConcept>
                    </extension>
                    <system value="https://fhir.nhs.uk/Id/nhs-number" />
                    <value value="4857774567" />
                </identifier>
                <name>
                    <use value="official" />
                    <text value="Mr Justin Thyme" />
                    <family value="Thyme" />
                    <given value="Justin" />
                    <prefix value="Mr" />
                </name>
                <gender value="male" />
                <birthDate value="1979-05-29" />
            </Patient>
        </resource>
    </entry>
    <!--  Medication    -->
    <entry>
        <fullUrl value="medication-123123123" />
        <resource>
            <Medication>
                <id value="medication-123123123" />
                <code>
                    <coding>
                        <system value="http://snomed.info/sct" />
                        <code value="11779711000001101" />
                        <display value="Boots Paracetamol 500mg capsules (The Boots Company Plc)" />
                    </coding>
                </code>
            </Medication>
        </resource>
    </entry>
    <!--   Medication Statement   -->
    <entry>
        <fullUrl value="med-statement-123123124456" />
        <resource>
            <MedicationStatement>
                <id value="med-statement-123123124456" />
                <status value="active" />
                <category>
                    <coding>
                        <system value="http://hl7.org/fhir/medication-request-category" />
                        <code value="patientspecified" />
                        <display value="patientspecified" />
                    </coding>
                </category>
                <medicationReference>
                    <reference value="medication-123123123" />
                    <display value="Boots Paracetamol 500mg capsules (The Boots Company Plc)" />
                </medicationReference>
                <subject>
                    <reference value="patient-01020304" />
                    <display value="Mr Justin Thyme" />
                </subject>
                <taken value="unk" />
                <dosage>
                    <timing>
                        <repeat>
                            <frequency value="2" />
                            <period value="1" />
                            <periodUnit value="d" />
                        </repeat>
                    </timing>
                    <route>
                        <coding>
                            <system value="http://snomed.info/sct" />
                            <code value="26643006" />
                            <display value="oral" />
                        </coding>
                    </route>
                    <doseQuantity>
                        <value value="1" />
                        <unit value="tablet" />
                        <system value="http://snomed.info/sct" />
                        <code value="428673006" />
                    </doseQuantity>
                </dosage>
            </MedicationStatement>
        </resource>
    </entry>
</Bundle>

The resource cannot be rendered.

Element 'taken' is not in the correct order At Bundle.entry[3].resource.taken, line 121, position 10

Bundle.id[0]921dacdd-3a3b-4649-ab03-f0b219486bc4
Bundle.type[0]message
Bundle.entry[0].fullUrl[0]message-header-167434
Bundle.entry[0].resource[0].id[0]message-header-167434
Bundle.entry[0].resource[0].text[0].status[0]generated
Bundle.entry[0].resource[0].text[0].div[0]<div xmlns="http://www.w3.org/1999/xhtml"><p>The quick brown fox jumps over the lazy dog</p></div>
Bundle.entry[0].resource[0].event[0].system[0]https://fhir.nhs.uk/STU3/CodeSystem/EventType-1
Bundle.entry[0].resource[0].event[0].code[0]individual-requirements-1
Bundle.entry[0].resource[0].event[0].display[0]Individual Requirements
Bundle.entry[0].resource[0].timestamp[0]2021-05-07T16:15:32+00:00
Bundle.entry[0].resource[0].source[0].endpoint[0]nhs-uk:addressing:ods:T48NT
Bundle.entry[0].resource[0].focus[0].reference[0]med-statement-123123124456
Bundle.entry[1].fullUrl[0]patient-01020305
Bundle.entry[1].resource[0].id[0]patient-01020305
Bundle.entry[1].resource[0].identifier[0].extension[0].url[0]https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1
Bundle.entry[1].resource[0].identifier[0].extension[0].value[0].coding[0].system[0]https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1
Bundle.entry[1].resource[0].identifier[0].extension[0].value[0].coding[0].code[0]01
Bundle.entry[1].resource[0].identifier[0].extension[0].value[0].coding[0].display[0]Number present and verified
Bundle.entry[1].resource[0].identifier[0].system[0]https://fhir.nhs.uk/Id/nhs-number
Bundle.entry[1].resource[0].identifier[0].value[0]4857774567
Bundle.entry[1].resource[0].name[0].use[0]official
Bundle.entry[1].resource[0].name[0].text[0]Mr Justin Thyme
Bundle.entry[1].resource[0].name[0].family[0]Thyme
Bundle.entry[1].resource[0].name[0].given[0]Justin
Bundle.entry[1].resource[0].name[0].prefix[0]Mr
Bundle.entry[1].resource[0].gender[0]male
Bundle.entry[1].resource[0].birthDate[0]1979-05-29
Bundle.entry[2].fullUrl[0]medication-123123123
Bundle.entry[2].resource[0].id[0]medication-123123123
Bundle.entry[2].resource[0].code[0].coding[0].system[0]http://snomed.info/sct
Bundle.entry[2].resource[0].code[0].coding[0].code[0]11779711000001101
Bundle.entry[2].resource[0].code[0].coding[0].display[0]Boots Paracetamol 500mg capsules (The Boots Company Plc)
Bundle.entry[3].fullUrl[0]med-statement-123123124456
Bundle.entry[3].resource[0].id[0]med-statement-123123124456
Bundle.entry[3].resource[0].status[0]active
Bundle.entry[3].resource[0].category[0].coding[0].system[0]http://hl7.org/fhir/medication-request-category
Bundle.entry[3].resource[0].category[0].coding[0].code[0]patientspecified
Bundle.entry[3].resource[0].category[0].coding[0].display[0]patientspecified
Bundle.entry[3].resource[0].medication[0].reference[0]medication-123123123
Bundle.entry[3].resource[0].medication[0].display[0]Boots Paracetamol 500mg capsules (The Boots Company Plc)
Bundle.entry[3].resource[0].subject[0].reference[0]patient-01020304
Bundle.entry[3].resource[0].subject[0].display[0]Mr Justin Thyme
Bundle.entry[3].resource[0].taken[0]unk
Bundle.entry[3].resource[0].dosage[0].timing[0].repeat[0].frequency[0]2
Bundle.entry[3].resource[0].dosage[0].timing[0].repeat[0].period[0]1
Bundle.entry[3].resource[0].dosage[0].timing[0].repeat[0].periodUnit[0]d
Bundle.entry[3].resource[0].dosage[0].route[0].coding[0].system[0]http://snomed.info/sct
Bundle.entry[3].resource[0].dosage[0].route[0].coding[0].code[0]26643006
Bundle.entry[3].resource[0].dosage[0].route[0].coding[0].display[0]oral
Bundle.entry[3].resource[0].dosage[0].dose[0].value[0]1
Bundle.entry[3].resource[0].dosage[0].dose[0].unit[0]tablet
Bundle.entry[3].resource[0].dosage[0].dose[0].system[0]http://snomed.info/sct
Bundle.entry[3].resource[0].dosage[0].dose[0].code[0]428673006
Bundle
back to top