<?xml version=“1.0” encoding=“UTF-8”?> <CarePlan xmlns=“hl7.org/fhir”>

<id value="example"/>
<meta>
  <security>
    <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason"/>
    <code value="HTEST"/>
    <display value="test health data"/>
  </security>
</meta>

<contained>
  <Condition>
    <id value="p1"/>
    <clinicalStatus>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
                <code value="active"/>
              </coding>
        </clinicalStatus>

        <verificationStatus>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
                <code value="confirmed"/>
              </coding>
        </verificationStatus>
    <code>
      <text value="Obesity"/>
    </code>
    <subject>
      <reference value="Patient/example"/>
      <display value="Peter James Chalmers"/>
    </subject>
  </Condition>
</contained>
      <identifier>
              <value value="12345"/>
      </identifier>
      <instantiatesUri value="http://example.org/protocol-for-obesity"/> 
      <basedOn>
              <display value="Management of Type 2 Diabetes"/>
      </basedOn>
      <replaces>
              <display value="Plan from urgent care clinic"/>
      </replaces>
      <partOf>
              <display value="Overall wellness plan"/>
      </partOf>
      <status value="active"/>
      <intent value="plan"/>
      <category>
              <text value="Weight management plan"/>
      </category>
      <description value="Manage obesity and weight loss"/>
      <subject>
              <reference value="Patient/example"/>
              <display value="Peter James Chalmers"/>
      </subject>
      <encounter>
              <reference value="Encounter/home"/>
      </encounter>
      <period>
              <end value="2017-06-01"/>
      </period>
      <created value="2016-01-01"/>
      <author>
              <reference value="Practitioner/example"/>
              <display value="Dr Adam Careful"/>
      </author>
      <careTeam>
              <reference value="CareTeam/example"/>
      </careTeam>
      <addresses>
              <reference value="#p1"/>
              <display value="obesity"/>
      </addresses>
      <goal>
              <reference value="Goal/example"/>
      </goal>
      <activity>
              <outcomeCodeableConcept>
                      <coding>
                              <system value="http://snomed.info/sct"/>
                              <code value="161832001"/>
                              <display value="Progressive weight loss"/>
                      </coding>
              </outcomeCodeableConcept>
              <outcomeReference>
                      <reference value="Observation/example"/>
                      <display value="Weight Measured"/>
              </outcomeReference>
              <detail>
              <code>
                      <!--      LOINC code      -->
                      <coding>
                              <system value="http://loinc.org"/>
                              <code value="3141-9"/>
                              <display value="Weight Measured"/>
                      </coding>
                      <!--      SNOMED CT Code    -->
                      <coding>
                              <system value="http://snomed.info/sct"/>
                              <code value="27113001"/>
                              <display value="Body weight"/>
                      </coding>
              </code>
              <status value="completed"/>
              <statusReason>
                      <text value="Achieved weight loss to mitigate diabetes risk."/>
              </statusReason>
              <doNotPerform value="false"/>
              <scheduledTiming>
                      <repeat>
                              <frequency value="1"/>
                              <period value="1"/>
                              <periodUnit value="d"/>
                      </repeat>
              </scheduledTiming>
              <location>
                      <display value="Patient's home"/>
              </location>
              <performer>
                      <reference value="Patient/example"/>
                      <display value="Peter James Chalmers"/>
              </performer>
  </detail>
</activity>

</CarePlan>