FHIR Release 3 (STU) 5 Preview #3
This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 4.0.1 . For a full list of available versions, see the Directory of published versions
Patient Administration Work Group Maturity Level : N/A Ballot Standards Status : Informative Security Category : Patient Compartments : Device , Patient , Practitioner

R2 : R3 Converson : R4 Conversion maps for Account.

Functional status for this map: 1 test 2 tests that all execute ok. All tests pass 2 fail round-trip testing and all r3 resources are valid. ( see documentation)

map "http://hl7.org/fhir/StructureMap/Account2to3" = "R2 to R3 Conversions for Account"
map "http://hl7.org/fhir/StructureMap/Account3to4" = "R3 to R4 Conversions for Account"
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Account" alias AccountR2 as source

uses "http://hl7.org/fhir/3.0/StructureDefinition/Account" alias AccountR3 as source

uses "http://hl7.org/fhir/StructureDefinition/Account" alias Account as target
imports "http://hl7.org/fhir/StructureMap/*2to3"

imports "http://hl7.org/fhir/StructureMap/*3to4"

group for type+types  Account extends DomainResource
  input src : AccountR2 as source
  input tgt : Account as target

group Account(source src : AccountR3, target tgt : Account) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.name -> tgt.name;
  src.subject -> tgt.subject;
  src.period -> tgt.servicePeriod;
  src.coverage as s -> tgt.coverage as t then AccountCoverage(s, t);
  src.owner -> tgt.owner;
  src.description -> tgt.description;
  src.guarantor as s -> tgt.guarantor as t then AccountGuarantor(s, t);
  src.partOf -> tgt.partOf;
}

  "Account-identifier" : for src.identifier make tgt.identifier
  "Account-name" : for src.name make tgt.name
  "Account-type" : for src.type make tgt.type
  "Account-status" : for src.status make tgt.status
  "Account-active" : for src.activePeriod make tgt.active
  "Account-balance" : for src.balance make tgt.balance
//  "Account-coveragePeriod" : for src.coveragePeriod make tgt.coveragePeriod - moved into coverage resource
  "Account-subject" : for src.subject make tgt.subject
  "Account-owner" : for src.owner make tgt.owner
  "Account-description" : for src.description make tgt.description

group AccountCoverage(source src, target tgt) extends BackboneElement {
  src.coverage -> tgt.coverage;
  src.priority -> tgt.priority;
}
group AccountGuarantor(source src, target tgt) extends BackboneElement {
  src.party -> tgt.party;
  src.onHold -> tgt.onHold;
  src.period -> tgt.period;
}

endgroup

map "http://hl7.org/fhir/StructureMap/Account3to2" = "R3 to R2 Conversion for Account"
map "http://hl7.org/fhir/StructureMap/Account4to3" = "R4 to R3 Conversion for Account"
uses "http://hl7.org/fhir/StructureDefinition/Account" alias Account as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Account" alias AccountR2 as target

uses "http://hl7.org/fhir/3.0/StructureDefinition/Account" alias AccountR3 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

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

group for type+types  Account extends DomainResource
  input src : Account as source
  input tgt : AccountR2 as target

group Account(source src : Account, target tgt : AccountR3) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.name -> tgt.name;
  src.subject -> tgt.subject;
  src.servicePeriod -> tgt.period;
  src.coverage as s -> tgt.coverage as t then AccountCoverage(s, t);
  src.owner -> tgt.owner;
  src.description -> tgt.description;
  src.guarantor as s -> tgt.guarantor as t then AccountGuarantor(s, t);
  src.partOf -> tgt.partOf;
}

  "Account-identifier" : for src.identifier make tgt.identifier
  "Account-name" : for src.name make tgt.name
  "Account-type" : for src.type make tgt.type
  "Account-status" : for src.status make tgt.status
  "Account-activePeriod" : for src.active make tgt.activePeriod
  "Account-balance" : for src.balance make tgt.balance
//  "Account-coveragePeriod" : for src.coveragePeriod make tgt.coveragePeriod - moved into coverage resource
  "Account-subject" : for src.subject make tgt.subject
  "Account-owner" : for src.owner make tgt.owner
  "Account-description" : for src.description make tgt.description

group AccountCoverage(source src, target tgt) extends BackboneElement {
  src.coverage -> tgt.coverage;
  src.priority -> tgt.priority;
}
group AccountGuarantor(source src, target tgt) extends BackboneElement {
  src.party -> tgt.party;
  src.onHold -> tgt.onHold;
  src.period -> tgt.period;
}

endgroup

<p>No validation errors - all conversions are clean</p>