@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://smart.who.int/ddcc/StructureMap/BundleVSToAddBundle> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "BundleVSToAddBundle"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2022-06-01T12:55:43.592+00:00"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre>map &quot;http://smart.who.int/ddcc/StructureMap/BundleVSToAddBundle&quot; = &quot;BundleVSToAddBundle&quot;\r\n\r\n\r\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias DDCCBundle as source\r\nuses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias AddBundle as target\r\n\r\nimports &quot;http://smart.who.int/ddcc/StructureMap/CoreDataSetVSToAddBundle&quot;\r\n\r\ngroup BundleVSToAddBundle(source ddccbundle : DDCCBundle, target bundle : AddBundle) {\r\n  ddccbundle.entry first as ddcc -&gt; bundle then CoreDataSetVSToAddBundle(ddcc, bundle) &quot;get first entry from bundle&quot;;\r\n}\r\n\r\n</pre></div>"
  ] ; # 
  fhir:url [ fhir:v "http://smart.who.int/ddcc/StructureMap/BundleVSToAddBundle"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "BundleVSToAddBundle"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2023-11-07T06:07:49+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "WHO"] ; # 
  fhir:contact ( [
     fhir:name [ fhir:v "WHO" ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://who.int" ]
     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "001" ]
     ] )
  ] ) ; # 
  fhir:structure ( [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>
     ] ;
     fhir:mode [ fhir:v "source" ] ;
     fhir:alias [ fhir:v "DDCCBundle" ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>
     ] ;
     fhir:mode [ fhir:v "target" ] ;
     fhir:alias [ fhir:v "AddBundle" ]
  ] ) ; # 
  fhir:import ( [
     fhir:v "http://smart.who.int/ddcc/StructureMap/CoreDataSetVSToAddBundle"^^xsd:anyURI ;
     fhir:link <http://smart.who.int/ddcc/StructureMap/CoreDataSetVSToAddBundle>
  ] ) ; # 
  fhir:group ( [
     fhir:name [ fhir:v "BundleVSToAddBundle" ] ;
     fhir:typeMode [ fhir:v "none" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "ddccbundle" ] ;
       fhir:type [ fhir:v "DDCCBundle" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "bundle" ] ;
       fhir:type [ fhir:v "AddBundle" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "get first entry from bundle" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "ddccbundle" ] ;
         fhir:element [ fhir:v "entry" ] ;
         fhir:listMode [ fhir:v "first" ] ;
         fhir:variable [ fhir:v "ddcc" ]
       ] ) ;
       fhir:target ( [
         fhir:contextType [ fhir:v "variable" ] ;
         fhir:transform [ fhir:v "copy" ] ;
         fhir:parameter ( [
           fhir:value [ fhir:v "bundle" ]
         ] )
       ] ) ;
       fhir:dependent ( [
         fhir:name [ fhir:v "CoreDataSetVSToAddBundle" ] ;
         fhir:variable ( [ fhir:v "ddcc" ] [ fhir:v "bundle" ] )
       ] )
     ] )
  ] ) . # 

# -------------------------------------------------------------------------------------

