FHIR Release 3 (STU) 4

This page is part of the FHIR Specification (v3.0.2: (v4.0.1: R4 - Mixed Normative and STU 3). ) in it's permanent home (it will always be available at this URL). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R4 R3

Financial Management Work Group Maturity Level : N/A Ballot Standards Status : Informative Security Category : Patient Compartments : Not linked to any defined compartments

R2 : R3 Converson : R4 Conversion maps for Contract.

Functional status for this map: 1 test that all execute ok. All 7 tests pass of which 5 fail to execute . 1 fail round-trip testing and all 5 r3 resources are valid. invalid (0 errors). ( see documentation)

map "http://hl7.org/fhir/StructureMap/Contract2to3" = "R2 to R3 Conversions for Contract"

map "http://hl7.org/fhir/StructureMap/Contract3to4" = "R3 to R4 Conversions for Contract"


uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Contract" alias ContractR2 as source
uses "http://hl7.org/fhir/StructureDefinition/Contract" alias Contract as target

uses "http://hl7.org/fhir/3.0/StructureDefinition/Contract" alias ContractR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Contract" alias Contract as target


imports "http://hl7.org/fhir/StructureMap/primitives2to3"
imports "http://hl7.org/fhir/StructureMap/DomainResource2to3"
imports "http://hl7.org/fhir/StructureMap/Attachment2to3"
imports "http://hl7.org/fhir/StructureMap/Identifier2to3"
imports "http://hl7.org/fhir/StructureMap/Reference2to3"
imports "http://hl7.org/fhir/StructureMap/Period2to3"
imports "http://hl7.org/fhir/StructureMap/CodeableConcept2to3"

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


group for type+types  Contract extends DomainResource
  input src : ContractR2 as source
  input tgt : Contract as target
  
  "Contract-identifier" : for src.identifier make tgt.identifier
  "Contract-issued" : for src.issued make tgt.issued
  "Contract-applies" : for src.applies make tgt.applies
  "Contract-subject" : for src.subject make tgt.subject
  "Contract-authority" : for src.authority make tgt.authority
  "Contract-domain" : for src.domain make tgt.domain
  "Contract-type" : for src.type make tgt.type
  "Contract-subType" : for src.subType make tgt.subType
  "Contract-action" : for src.action make tgt.action
  "Contract-actionReason" : for src.actionReason make tgt.actionReason
  "Contract-actor" : for src.actor as vs make tgt.agent as vt then cntActor(vs, vt)
  "Contract-valuedItem" : for src.valuedItem as vs make tgt.valuedItem as vt then cntValuedItem(vs, vt)
  "Contract-signer" : for src.signer as vs make tgt.signer as vt then cntSigner(vs, vt)
  "Contract-term" : for src.term as vs make tgt.term as vt then cntTerm(vs, vt)
  "Contract-binding" : for src.binding make tgt.binding
  "Contract-friendly" : for src.friendly as vs make tgt.friendly as vt then cntContent(vs, vt)
  "Contract-legal" : for src.legal as vs make tgt.legal as vt then cntContent(vs, vt)
  "Contract-rule" : for src.rule as vs make tgt.rule as vt then cntContent(vs, vt)
endgroup

group Contract(source src : ContractR3, target tgt : Contract) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.contentDerivative -> tgt.contentDerivative;
  src.issued -> tgt.issued;
  src.applies -> tgt.applies;
  src.subject -> tgt.subject;
  src.authority -> tgt.authority;
  src.domain -> tgt.domain;
  src.type -> tgt.type;
  src.subType -> tgt.subType;
  src.term as s -> tgt.term as t then ContractTerm(s, t);
  src.signer as s -> tgt.signer as t then ContractSigner(s, t);
  src.friendly as s -> tgt.friendly as t then ContractFriendly(s, t);
  src.legal as s -> tgt.legal as t then ContractLegal(s, t);
  src.rule as s -> tgt.rule as t then ContractRule(s, t);
  src.legallyBinding -> tgt.legallyBinding;
}


group cntActor extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.actor-entity" : for src.entity make tgt.actor
  "Contract.actor-role" : for src.role make tgt.role
endgroup

group ContractTerm(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.issued -> tgt.issued;
  src.applies -> tgt.applies;
  src.type -> tgt.type;
  src.subType -> tgt.subType;
  src.offer as s -> tgt.offer as t then ContractTermOffer(s, t);
  src.asset as s -> tgt.asset as t then ContractTermAsset(s, t);
  src.agent as s -> tgt.agent as t then ContractTermAgent(s, t);
  src.action -> tgt.action;
  src.actionReason -> tgt.actionReason;
  src.group -> tgt.group;
}


group cntValuedItem extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.valuedItem-entity" : for src.entity make tgt.entity
  "Contract.valuedItem-identifier" : for src.identifier make tgt.identifier
  "Contract.valuedItem-effectiveTime" : for src.effectiveTime make tgt.effectiveTime
  "Contract.valuedItem-quantity" : for src.quantity make tgt.quantity
  "Contract.valuedItem-unitPrice" : for src.unitPrice make tgt.unitPrice
  "Contract.valuedItem-factor" : for src.factor make tgt.factor
  "Contract.valuedItem-points" : for src.points make tgt.points
  "Contract.valuedItem-net" : for src.net make tgt.net
endgroup

group ContractTermOffer(source src, target tgt) extends BackboneElement {
  src.topic -> tgt.topic;
  src.type -> tgt.type;
  src.decision -> tgt.decision;
  src.text -> tgt.text;
  src.linkId -> tgt.linkId;
}


group cntSigner extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.signer-type" : for src.type make tgt.type
  "Contract.signer-party" : for src.party make tgt.party
  "Contract.signer-signature" : for src.signature make tgt.signature
endgroup

group ContractTermAsset(source src, target tgt) extends BackboneElement {
  src.class -> tgt.class;
  src.code -> tgt.code;
  src.period -> tgt.period;
  src.dataPeriod -> tgt.dataPeriod;
  src.data as s -> tgt.data as t then ContractTermAssetData(s, t);
  src.valuedItem as s -> tgt.valuedItem as t then ContractTermAssetValuedItem(s, t);
  src.securityLabel -> tgt.securityLabel;
}


group cntTerm extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.term-identifier" : for src.identifier make tgt.identifier
  "Contract.term-issued" : for src.issued make tgt.issued
  "Contract.term-applies" : for src.applies make tgt.applies
  "Contract.term-type" : for src.type make tgt.type
  "Contract.term-subType" : for src.subType make tgt.subType
  "Contract.term-subject" : for src.subject make tgt.topic
  "Contract.term-action" : for src.action make tgt.action
  "Contract.term-actionReason" : for src.actionReason make tgt.actionReason
  "Contract.term-actor" : for src.actor as vs make tgt.agent as vt then cntActor(vs, vt)
  "Contract.term-text" : for src.text make tgt.text
  "Contract.term-valuedItem" : for src.valuedItem as vs make tgt.valuedItem as vt then cntValuedItem(vs, vt)
  "Contract.term-group" : for src.group as vs make tgt.group as vt then cntTerm(vs, vt)
endgroup

group ContractTermAssetData(source src, target tgt) extends BackboneElement {
  src.meaning -> tgt.meaning;
  src.reference -> tgt.reference;
}

group ContractTermAssetValuedItem(source src, target tgt) extends BackboneElement {
  src.entity -> tgt.entity;
  src.identifier -> tgt.identifier;
  src.effectiveTime -> tgt.effectiveTime;
  src.quantity -> tgt.quantity;
  src.unitPrice -> tgt.unitPrice;
  src.factor -> tgt.factor;
  src.points -> tgt.points;
  src.net -> tgt.net;
}

group ContractTermAgent(source src, target tgt) extends BackboneElement {
  src.actor -> tgt.actor;
  src.role -> tgt.role;
}

group ContractSigner(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.party -> tgt.party;
  src.signature -> tgt.signature;
}

group ContractFriendly(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}

group ContractLegal(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}

group ContractRule(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}


group cntContent extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.content-content" : for src.content make tgt.content
endgroup


map "http://hl7.org/fhir/StructureMap/Contract3to2" = "R3 to R2 Conversion for Contract"

map "http://hl7.org/fhir/StructureMap/Contract4to3" = "R4 to R3 Conversion for Contract"


uses "http://hl7.org/fhir/StructureDefinition/Contract" alias Contract as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/Contract" alias ContractR2 as target

uses "http://hl7.org/fhir/StructureDefinition/Contract" alias Contract as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Contract" alias ContractR3 as target


imports "http://hl7.org/fhir/StructureMap/primitives3to2"
imports "http://hl7.org/fhir/StructureMap/DomainResource3to2"
imports "http://hl7.org/fhir/StructureMap/Attachment3to2"
imports "http://hl7.org/fhir/StructureMap/Identifier3to2"
imports "http://hl7.org/fhir/StructureMap/Reference3to2"
imports "http://hl7.org/fhir/StructureMap/Period3to2"
imports "http://hl7.org/fhir/StructureMap/CodeableConcept3to2"

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


group for type+types  Contract extends DomainResource
  input src : Contract as source
  input tgt : ContractR2 as target

group Contract(source src : ContractR3, target tgt : Contract) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status -> tgt.status;
  src.contentDerivative -> tgt.contentDerivative;
  src.issued -> tgt.issued;
  src.applies -> tgt.applies;
  src.subject -> tgt.subject;
  src.authority -> tgt.authority;
  src.domain -> tgt.domain;
  src.type -> tgt.type;
  src.subType -> tgt.subType;
  src.term as s -> tgt.term as t then ContractTerm(s, t);
  src.signer as s -> tgt.signer as t then ContractSigner(s, t);
  src.friendly as s -> tgt.friendly as t then ContractFriendly(s, t);
  src.legal as s -> tgt.legal as t then ContractLegal(s, t);
  src.rule as s -> tgt.rule as t then ContractRule(s, t);
  src.legallyBinding -> tgt.legallyBinding;
}


  "Contract-identifier" : for src.identifier make tgt.identifier
  "Contract-issued" : for src.issued make tgt.issued
  "Contract-applies" : for src.applies make tgt.applies
  "Contract-subject" : for src.subject make tgt.subject
  "Contract-authority" : for src.authority make tgt.authority
  "Contract-domain" : for src.domain make tgt.domain
  "Contract-type" : for src.type make tgt.type
  "Contract-subType" : for src.subType make tgt.subType
  "Contract-action" : for src.action make tgt.action
  "Contract-actionReason" : for src.actionReason make tgt.actionReason
  "Contract-actor" : for src.agent as vs make tgt.actor as vt then cntActor(vs, vt)
  "Contract-valuedItem" : for src.valuedItem as vs make tgt.valuedItem as vt then cntValuedItem(vs, vt)
  "Contract-signer" : for src.signer as vs make tgt.signer as vt then cntSigner(vs, vt)
  "Contract-term" : for src.term as vs make tgt.term as vt then cntTerm(vs, vt)
  "Contract-binding" : for src.binding make tgt.binding
  "Contract-friendly" : for src.friendly as vs make tgt.friendly as vt then cntContent(vs, vt)
  "Contract-legal" : for src.legal as vs make tgt.legal as vt then cntContent(vs, vt)
  "Contract-rule" : for src.rule as vs make tgt.rule as vt then cntContent(vs, vt)
endgroup

group ContractTerm(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.issued -> tgt.issued;
  src.applies -> tgt.applies;
  src.type -> tgt.type;
  src.subType -> tgt.subType;
  src.offer as s -> tgt.offer as t then ContractTermOffer(s, t);
  src.asset as s -> tgt.asset as t then ContractTermAsset(s, t);
  src.agent as s -> tgt.agent as t then ContractTermAgent(s, t);
  src.action -> tgt.action;
  src.actionReason -> tgt.actionReason;
  src.group -> tgt.group;
}


group cntActor extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.actor-entity" : for src.actor make tgt.entity
  "Contract.actor-role" : for src.role make tgt.role
endgroup

group ContractTermOffer(source src, target tgt) extends BackboneElement {
  src.topic -> tgt.topic;
  src.type -> tgt.type;
  src.decision -> tgt.decision;
  src.text -> tgt.text;
  src.linkId -> tgt.linkId;
}


group cntValuedItem extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.valuedItem-entity" : for src.entity make tgt.entity
  "Contract.valuedItem-identifier" : for src.identifier make tgt.identifier
  "Contract.valuedItem-effectiveTime" : for src.effectiveTime make tgt.effectiveTime
  "Contract.valuedItem-quantity" : for src.quantity make tgt.quantity
  "Contract.valuedItem-unitPrice" : for src.unitPrice make tgt.unitPrice
  "Contract.valuedItem-factor" : for src.factor make tgt.factor
  "Contract.valuedItem-points" : for src.points make tgt.points
  "Contract.valuedItem-net" : for src.net make tgt.net
endgroup

group ContractTermAsset(source src, target tgt) extends BackboneElement {
  src.class -> tgt.class;
  src.code -> tgt.code;
  src.period -> tgt.period;
  src.dataPeriod -> tgt.dataPeriod;
  src.data as s -> tgt.data as t then ContractTermAssetData(s, t);
  src.valuedItem as s -> tgt.valuedItem as t then ContractTermAssetValuedItem(s, t);
  src.securityLabel -> tgt.securityLabel;
}


group cntSigner extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.signer-type" : for src.type make tgt.type
  "Contract.signer-party" : for src.party make tgt.party
  "Contract.signer-signature" : for src.signature make tgt.signature
endgroup

group ContractTermAssetData(source src, target tgt) extends BackboneElement {
  src.meaning -> tgt.meaning;
  src.reference -> tgt.reference;
}


group cntTerm extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.term-identifier" : for src.identifier make tgt.identifier
  "Contract.term-issued" : for src.issued make tgt.issued
  "Contract.term-applies" : for src.applies make tgt.applies
  "Contract.term-type" : for src.type make tgt.type
  "Contract.term-subType" : for src.subType make tgt.subType
  "Contract.term-subject" : for src.topic make tgt.subject
  "Contract.term-action" : for src.action make tgt.action
  "Contract.term-actionReason" : for src.actionReason make tgt.actionReason
  "Contract.term-actor" : for src.agent as vs make tgt.actor as vt then cntActor(vs, vt)
  "Contract.term-text" : for src.text make tgt.text
  "Contract.term-valuedItem" : for src.valuedItem as vs make tgt.valuedItem as vt then cntValuedItem(vs, vt)
  "Contract.term-group" : for src.group as vs make tgt.group as vt then cntTerm(vs, vt)
endgroup

group ContractTermAssetValuedItem(source src, target tgt) extends BackboneElement {
  src.entity -> tgt.entity;
  src.identifier -> tgt.identifier;
  src.effectiveTime -> tgt.effectiveTime;
  src.quantity -> tgt.quantity;
  src.unitPrice -> tgt.unitPrice;
  src.factor -> tgt.factor;
  src.points -> tgt.points;
  src.net -> tgt.net;
}

group ContractTermAgent(source src, target tgt) extends BackboneElement {
  src.actor -> tgt.actor;
  src.role -> tgt.role;
}

group ContractSigner(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.party -> tgt.party;
  src.signature -> tgt.signature;
}

group ContractFriendly(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}

group ContractLegal(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}

group ContractRule(source src, target tgt) extends BackboneElement {
  src.content -> tgt.content;
}


group cntContent extends BackboneElement
  input src as source
  input tgt as target
  
  "Contract.content-content" : for src.content make tgt.content
endgroup


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