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

FHIR IG Statistics: StructureMap/Subscription4to5

Packagehl7.fhir.uv.xver
TypeStructureMap
IdSubscription4to5
FHIR VersionR5
Sourcehttp://hl7.org/fhir/extensions/https://build.fhir.org/ig/HL7/fhir-cross-version/StructureMap-Subscription4to5.html
URLhttp://hl7.org/fhir/StructureMap/Subscription4to5
Version0.1.0
Statusactive
Date2024-02-22T03:16:50+00:00
NameSubscription4to5
TitleSubscription Transforms: R4 to R5
Realmuv
Authorityhl7
DescriptionSubscriptionTransformsR4toR5

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/Subscription4to5'
/// name = 'Subscription4to5'
/// title = 'Subscription Transforms: R4 to R5'
/// status = 'active'

uses "http://hl7.org/fhir/4.0/Subscription" alias SubscriptionR4 as source
uses "http://hl7.org/fhir/5.0/Subscription" alias SubscriptionR5 as target

imports "http://hl7.org/fhir/StructureMap/*4to5"

group Subscription(source src : SubscriptionR4, target tgt : SubscriptionR5) extends DomainResource <<type+>> {
  src.status as v -> tgt.status = translate(v, 'http://hl7.org/fhir/ConceptMap/Subscription.status-R4toR5', 'code');
  src.contact -> tgt.contact;
  src.end -> tgt.end;
  src.reason -> tgt.reason;
  src.channel as s -> tgt then {
    s.type as s1 ->  tgt.channelType = create('Coding') as t,  t.code = s1;
    s.endpoint -> tgt.endpoint;
    s.header as s1 ->  tgt.parameter as t,  t.name = (%s1.substring(0, %s1.indexOf(': '))),  t.value = (%s1.substring(%s1.indexOf(': ') + 1));
    s.payload -> tgt.contentType;
  };
}


Source

{
  "resourceType": "StructureMap",
  "id": "Subscription4to5",
  "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/Subscription4to5",
  "version": "0.1.0",
  "name": "Subscription4to5",
  "title": "Subscription Transforms: R4 to R5",
  "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": "SubscriptionTransformsR4toR5",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001"
        }
      ]
    }
  ],
  "structure": [
    {
      "url": "http://hl7.org/fhir/4.0/Subscription",
      "mode": "source",
      "alias": "SubscriptionR4"
    },
    {
      "url": "http://hl7.org/fhir/5.0/Subscription",
      "mode": "target",
      "alias": "SubscriptionR5"
    }
  ],
  "import": [
    "http://hl7.org/fhir/StructureMap/*4to5"
  ],
  "group": [
    {
      "name": "Subscription",
      "extends": "DomainResource",
      "typeMode": "type-and-types",
      "input": [
        {
          "name": "src",
          "type": "SubscriptionR4",
          "mode": "source"
        },
        {
          "name": "tgt",
          "type": "SubscriptionR5",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "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/Subscription.status-R4toR5"
                },
                {
                  "valueString": "code"
                }
              ]
            }
          ]
        },
        {
          "name": "contact",
          "source": [
            {
              "context": "src",
              "element": "contact",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "contact",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "end",
          "source": [
            {
              "context": "src",
              "element": "end",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "end",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "reason",
          "source": [
            {
              "context": "src",
              "element": "reason",
              "variable": "vvv"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "reason",
              "variable": "vvv",
              "transform": "create"
            }
          ],
          "dependent": [
            {
              "name": "DefaultMappingGroupAnonymousAlias",
              "parameter": [
                {
                  "valueId": "vvv"
                },
                {
                  "valueId": "vvv"
                }
              ]
            }
          ]
        },
        {
          "name": "channel",
          "source": [
            {
              "context": "src",
              "element": "channel",
              "variable": "s"
            }
          ],
          "target": [
            {
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "tgt"
                }
              ]
            }
          ],
          "rule": [
            {
              "name": "type",
              "source": [
                {
                  "context": "s",
                  "element": "type",
                  "variable": "s1"
                }
              ],
              "target": [
                {
                  "context": "tgt",
                  "element": "channelType",
                  "variable": "t",
                  "transform": "create",
                  "parameter": [
                    {
                      "valueString": "Coding"
                    }
                  ]
                },
                {
                  "context": "t",
                  "element": "code",
                  "transform": "copy",
                  "parameter": [
                    {
                      "valueId": "s1"
                    }
                  ]
                }
              ]
            },
            {
              "name": "endpoint",
              "source": [
                {
                  "context": "s",
                  "element": "endpoint",
                  "variable": "vvv"
                }
              ],
              "target": [
                {
                  "context": "tgt",
                  "element": "endpoint",
                  "variable": "vvv",
                  "transform": "create"
                }
              ],
              "dependent": [
                {
                  "name": "DefaultMappingGroupAnonymousAlias",
                  "parameter": [
                    {
                      "valueId": "vvv"
                    },
                    {
                      "valueId": "vvv"
                    }
                  ]
                }
              ]
            },
            {
              "name": "header",
              "source": [
                {
                  "context": "s",
                  "element": "header",
                  "variable": "s1"
                }
              ],
              "target": [
                {
                  "context": "tgt",
                  "element": "parameter",
                  "variable": "t"
                },
                {
                  "context": "t",
                  "element": "name",
                  "transform": "evaluate",
                  "parameter": [
                    {
                      "valueString": "%s1.substring(0, %s1.indexOf(': '))"
                    }
                  ]
                },
                {
                  "context": "t",
                  "element": "value",
                  "transform": "evaluate",
                  "parameter": [
                    {
                      "valueString": "%s1.substring(%s1.indexOf(': ') + 1)"
                    }
                  ]
                }
              ]
            },
            {
              "name": "payload",
              "source": [
                {
                  "context": "s",
                  "element": "payload",
                  "variable": "vvv"
                }
              ],
              "target": [
                {
                  "context": "tgt",
                  "element": "contentType",
                  "variable": "vvv",
                  "transform": "create"
                }
              ],
              "dependent": [
                {
                  "name": "DefaultMappingGroupAnonymousAlias",
                  "parameter": [
                    {
                      "valueId": "vvv"
                    },
                    {
                      "valueId": "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}