FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/Location5to4B

Packagehl7.fhir.uv.xver
Resource TypeStructureMap
IdLocation5to4B
FHIR VersionR5
Sourcehttp://hl7.org/fhir/extensions/https://build.fhir.org/ig/HL7/fhir-cross-version/StructureMap-Location5to4B.html
URLhttp://hl7.org/fhir/StructureMap/Location5to4B
Version0.1.0
Statusactive
Date2024-02-22T03:16:50+00:00
NameLocation5to4B
TitleLocation Transforms: R5 to R4B
Realmuv
Authorityhl7
DescriptionLocationTransformsR5toR4B

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

/// url = 'http://hl7.org/fhir/StructureMap/Location5to4B'
/// name = 'Location5to4B'
/// title = 'Location Transforms: R5 to R4B'
/// status = 'active'

uses "http://hl7.org/fhir/5.0/Location" alias LocationR5 as source
uses "http://hl7.org/fhir/4.0/Location" alias LocationR4B as target

imports "http://hl7.org/fhir/StructureMap/*5to4B"

group Location(source src : LocationR5, target tgt : LocationR4B) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, 'http://hl7.org/fhir/ConceptMap/Location.status-R5toR4', 'code');
  src.operationalStatus -> tgt.operationalStatus;
  src.name -> tgt.name;
  src.alias -> tgt.alias;
  src.description -> tgt.description;
  src.mode as v -> tgt.mode = translate(v, 'http://hl7.org/fhir/ConceptMap/Location.mode-R5toR4', 'code');
  src.type -> tgt.type;
  src.contact as s -> tgt.telecom = s.telecom;
  src.address -> tgt.address;
  src.form -> tgt.physicalType;
  src.position as s -> tgt.position as t then LocationPosition(s, t);
  src.managingOrganization -> tgt.managingOrganization;
  src.partOf -> tgt.partOf;
  src.hoursOfOperation as s ->  tgt.hoursOfOperation = create('BackboneElement') as te,  te.daysOfWeek = s.daysOfWeek,  te.allDay = s.allDay,  te.openingTime = s.availableStartTime,  te.closingTime = s.availableEndTime;
  src.endpoint -> tgt.endpoint;
}

group LocationPosition(source src, target tgt) extends BackboneElement {
  src.longitude -> tgt.longitude;
  src.latitude -> tgt.latitude;
  src.altitude -> tgt.altitude;
}


Source

{
  "resourceType": "StructureMap",
  "id": "Location5to4B",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "fhir"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1,
      "_valueInteger": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical": "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "draft",
      "_valueCode": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical": "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    }
  ],
  "url": "http://hl7.org/fhir/StructureMap/Location5to4B",
  "version": "0.1.0",
  "name": "Location5to4B",
  "title": "Location Transforms: R5 to R4B",
  "status": "active",
  "date": "2024-02-22T03:16:50+00:00",
  "publisher": "HL7 International / FHIR Infrastructure",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description": "LocationTransformsR5toR4B",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001"
        }
      ]
    }
  ],
  "structure": [
    {
      "url": "http://hl7.org/fhir/5.0/Location",
      "mode": "source",
      "alias": "LocationR5"
    },
    {
      "url": "http://hl7.org/fhir/4.0/Location",
      "mode": "target",
      "alias": "LocationR4B"
    }
  ],
  "import": [
    "http://hl7.org/fhir/StructureMap/*5to4B"
  ],
  "group": [
    {
      "name": "Location",
      "extends": "DomainResource",
      "typeMode": "type-and-types",
      "input": [
        {
          "name": "src",
          "type": "LocationR5",
          "mode": "source"
        },
        {
          "name": "tgt",
          "type": "LocationR4B",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "identifier",
          "source": [
            {
              "context": "src",
              "element": "identifier",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "identifier",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "status",
          "source": [
            {
              "context": "src",
              "element": "status",
              "variable": "v"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "status",
              "transform": "translate",
              "parameter": [
                {
                  "valueId": "v"
                },
                {
                  "valueString": "http://hl7.org/fhir/ConceptMap/Location.status-R5toR4"
                },
                {
                  "valueString": "code"
                }
              ]
            }
          ]
        },
        {
          "name": "operationalStatus",
          "source": [
            {
              "context": "src",
              "element": "operationalStatus",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "operationalStatus",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "name",
          "source": [
            {
              "context": "src",
              "element": "name",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "name",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "alias",
          "source": [
            {
              "context": "src",
              "element": "alias",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "alias",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "description",
          "source": [
            {
              "context": "src",
              "element": "description",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "description",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "mode",
          "source": [
            {
              "context": "src",
              "element": "mode",
              "variable": "v"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "mode",
              "transform": "translate",
              "parameter": [
                {
                  "valueId": "v"
                },
                {
                  "valueString": "http://hl7.org/fhir/ConceptMap/Location.mode-R5toR4"
                },
                {
                  "valueString": "code"
                }
              ]
            }
          ]
        },
        {
          "name": "type",
          "source": [
            {
              "context": "src",
              "element": "type",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "type",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "contact",
          "source": [
            {
              "context": "src",
              "element": "contact",
              "variable": "s"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "telecom",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "s.telecom"
                }
              ]
            }
          ]
        },
        {
          "name": "address",
          "source": [
            {
              "context": "src",
              "element": "address",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "address",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "form",
          "source": [
            {
              "context": "src",
              "element": "form",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "physicalType",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "position",
          "source": [
            {
              "context": "src",
              "element": "position",
              "variable": "s"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "position",
              "variable": "t"
            }
          ],
          "dependent": [
            {
              "name": "LocationPosition",
              "parameter": [
                {
                  "valueId": "s"
                },
                {
                  "valueId": "t"
                }
              ]
            }
          ]
        },
        {
          "name": "managingOrganization",
          "source": [
            {
              "context": "src",
              "element": "managingOrganization",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "managingOrganization",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "partOf",
          "source": [
            {
              "context": "src",
              "element": "partOf",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "partOf",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "hoursOfOperation",
          "source": [
            {
              "context": "src",
              "element": "hoursOfOperation",
              "variable": "s"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "hoursOfOperation",
              "variable": "te",
              "transform": "create",
              "parameter": [
                {
                  "valueString": "BackboneElement"
                }
              ]
            },
            {
              "context": "te",
              "element": "daysOfWeek",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "s.daysOfWeek"
                }
              ]
            },
            {
              "context": "te",
              "element": "allDay",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "s.allDay"
                }
              ]
            },
            {
              "context": "te",
              "element": "openingTime",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "s.availableStartTime"
                }
              ]
            },
            {
              "context": "te",
              "element": "closingTime",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "s.availableEndTime"
                }
              ]
            }
          ]
        },
        {
          "name": "endpoint",
          "source": [
            {
              "context": "src",
              "element": "endpoint",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "endpoint",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "LocationPosition",
      "extends": "BackboneElement",
      "input": [
        {
          "name": "src",
          "mode": "source"
        },
        {
          "name": "tgt",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "longitude",
          "source": [
            {
              "context": "src",
              "element": "longitude",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "longitude",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "latitude",
          "source": [
            {
              "context": "src",
              "element": "latitude",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "latitude",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "altitude",
          "source": [
            {
              "context": "src",
              "element": "altitude",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "altitude",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}