example_bundles1 {fhircrackr}R Documentation

Toy example bundles for multiple entries

Description

These data examples are bundles that contain very few, very simple resources that have multiple entries and can be used for demonstration purposes. See Source for how the xml versions look.

Usage

example_bundles1

example_bundles2

example_bundles3

example_bundles4

example_bundles5

Format

An object of class fhir_bundle_list of length 1.

An object of class fhir_bundle_list of length 1.

An object of class fhir_bundle_list of length 1.

An object of class fhir_bundle_list of length 1.

An object of class fhir_bundle_list of length 1.

Details

example_bundles1 contains 1 bundle with 2 Patient resources.

example_bundles2 contains 1 bundle with 3 Patient resources.

example_bundles3 contains 1 bundle with 3 Patient resources and 1 Observation resource.

example_bundles4 contains 1 bundle with 2 Medication resources, one of which has some ⁠@id⁠ xml attributes

example_bundles5 contains 1 bundle with 2 Observation resources.

Source

example_bundles1

<Bundle>
 <type value='searchset'/>
 <entry>
  <resource>
    <Patient>
       <id value='id1'/>
	      <address>
	         <use value='home'/>
	         <city value='Amsterdam'/>
	         <type value='physical'/>
	         <country value='Netherlands'/>
	      </address>
	      <name>
	         <given value='Marie'/>
	      </name>
    </Patient>
  </resource>
 </entry>

 <entry>
  <resource>
    <Patient>
       <id value='id3'/>
	      <address>
	         <use value='home'/>
	         <city value='Berlin'/>
	      </address>
       <address>
          <type value='postal'/>
          <country value='France'/>
       </address>
	      <address>
	         <use value='work'/>
	         <city value='London'/>
	         <type value='postal'/>
	         <country value='England'/>
	      </address>
       <name>
          <given value='Frank'/>
       </name>
       <name>
          <given value='Max'/>
       </name>
    </Patient>
  </resource>
 </entry>
</Bundle>

example_bundles2

<Bundle>
 <type value='searchset'/>
 <entry>
  <resource>
     <Patient>
        <id value='id1'/>
        <address>
           <use value='home'/>
           <city value='Amsterdam'/>
           <type value='physical'/>
           <country value='Netherlands'/>
        </address>
        <name>
           <given value='Marie'/>
        </name>
     </Patient>
   </resource>
 </entry>

 <entry>
  <resource>
    <Patient>
        <id value='id2'/>
        <address>
           <use value='home'/>
           <city value='Rome'/>
           <type value='physical'/>
           <country value='Italy'/>
        </address>
        <address>
           <use value='work'/>
           <city value='Stockholm'/>
	          <type value='postal'/>
           <country value='Sweden'/>
        </address>
        <name>
           <given value='Susie'/>
       </name>
    </Patient>
  </resource>
 </entry>

 <entry>
  <resource>
    <Patient>
       <id value='id3'/>
       <address>
          <use value='home'/>
          <city value='Berlin'/>
       </address>
       <address>
          <type value='postal'/>
          <country value='France'/>
       </address>
       <address>
          <use value='work'/>
          <city value='London'/>
          <type value='postal'/>
          <country value='England'/>
       </address>
       <name>
          <given value='Frank'/>
      </name>
      <name>
          <given value='Max'/>
       </name>
    </Patient>
  </resource>
 </entry>
</Bundle>

example_bundles3

<Bundle>
 <type value='searchset'/>
 <entry>
  <resource>
    <Patient>
       <id value='id1'/>
       <address>
          <use value='home'/>
          <city value='Amsterdam'/>
          <type value='physical'/>
          <country value='Netherlands'/>
       </address>
       <name>
          <given value='Marie'/>
       </name>
    </Patient>
  </resource>
 </entry>

 <entry>
  <resource>
    <Patient>
       <id value='id2'/>
       <address>
          <use value='home'/>
          <city value='Rome'/>
          <type value='physical'/>
          <country value='Italy'/>
       </address>
       <address>
          <use value='work'/>
          <city value='Stockholm'/>
          <type value='postal'/>
          <country value='Sweden'/>
       </address>
       <name>
          <given value='Susie'/>
       </name>
    </Patient>
  </resource>
 </entry>

 <entry>
  <resource>
    <Patient>
       <id value='id3'/>
       <address>
          <use value='home'/>
          <city value='Berlin'/>
       </address>
       <address>
          <type value='postal'/>
          <country value='France'/>
       </address>
       <address>
          <use value='work'/>
          <city value='London'/>
          <type value='postal'/>
          <country value='England'/>
       </address>
       <name>
          <given value='Frank'/>
       </name>
       <name>
          <given value='Max'/>
       </name>
    </Patient>
  <resource/>
 </entry>

 <entry>
  <resource>
    <Observation>
       <id value = 'obs1'/>
       <code>
          <coding>
             <system value='http://loinc.org'/>
             <code value='29463-7'/>
             <display value='Body Weight'/>
          </coding>
          <coding>
             <system value='http://snomed.info/sct'/>
             <code value='27113001'/>
             <display value='Body weight'/>
          </coding>
       </code>
       <subject>
          <reference value='Patient/id3'/>
       </subject>
    </Observation>
  </resource>
 </entry>
</Bundle>"

example_bundles4

<Bundle>
    <type value='searchset'/>
 <entry>
	 <resource>
		<Medication>
		    <id value='1285'/>
		    <code>
		        <coding>
		            <system value='http://www.nlm.nih.gov/research/umls/rxnorm'/>
		            <code value='1594660'/>
		            <display value='Alemtuzumab 10mg/ml (Lemtrada)'/>
		        </coding>
		    </code>
		    <ingredient id='1'>
		    	<itemReference>
	        		<reference value='Substance/5463'/>
	    		</itemReference>
		    </ingredient>
		    <ingredient id='2'>
		    	<itemReference>
	        		<reference value='Substance/3401'/>
	    		</itemReference>
		    </ingredient>
		</Medication>
	</resource>
 </entry>

 <entry>
	 <resource>
         <Medication>
             <id value='45226'/>
             <code>
                 <coding>
                     <system value='http://snomed.info/sct'/>
                     <code value='373994007'/>
                     <display value='Prednisone 5mg tablet (Product)'/>
                 </coding>
                 <text value='Prednisone 5mg tablet (Product)'/>
             </code>
		    <ingredient id='1'>
		    	<itemReference>
	        		<reference value='Substance/6912'/>
	    		</itemReference>
		    </ingredient>
		    <ingredient id='2'>
		    	<itemReference>
	        		<reference value='Substance/3710'/>
	    		</itemReference>
		    </ingredient>
		</Medication>
	</resource>
 </entry>

</Bundle>

example_bundles5

<Bundle>
 <type value='searchset'/>
 <entry>
  <resource>
    <Observation>
       <id value = 'obs1'/>
       <code>
          <coding>
             <system value='http://loinc.org'/>
             <code value='29463-7'/>
             <display value='Body Weight'/>
          </coding>
          <coding>
             <system value='http://snomed.info/sct'/>
             <code value='27113001'/>
             <display value='Body weight'/>
          </coding>
       </code>
       <subject>
          <reference value='Patient/id3'/>
       </subject>
    </Observation>
  </resource>
 </entry>

 <entry>
  <resource>
    <Observation>
       <id value = 'obs2'/>
       <code>
          <coding>
             <system value='http://loinc.org'/>
             <code value='8302-2'/>
             <display value='Body Height'/>
          </coding>
          <coding>
             <system value='http://snomed.info/sct'/>
             <code value='50373000'/>
             <display value='Body height measure'/>
          </coding>
       </code>
       <subject>
          <reference value='Patient/id3'/>
       </subject>
    </Observation>
  </resource>
 </entry>
</Bundle>"

Examples

#unserialize xml objects before doing anything else with them!
fhir_unserialize(bundles = example_bundles1)
#unserialize xml objects before doing anything else with them!
fhir_unserialize(bundles = example_bundles2)
#unserialize xml objects before doing anything else with them!
fhir_unserialize(bundles = example_bundles3)
#unserialize xml objects before doing anything else with them!
fhir_unserialize(bundles = example_bundles4)
#unserialize xml objects before doing anything else with them!
fhir_unserialize(bundles = example_bundles5)

[Package fhircrackr version 2.2.0 Index]