FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

StructureMap: FML Conversion for PaymentReconciliation: R4B to R5

Official URL: http://hl7.org/fhir/StructureMap/PaymentReconciliation4Bto5 Version: 5.1.0-ballot1
Standards status: Trial-use Maturity Level: 1 Computable Name: PaymentReconciliation4Bto5

FMLConversionforPaymentReconciliationR4BtoR5

/// url = 'http://hl7.org/fhir/StructureMap/PaymentReconciliation4Bto5'
/// name = 'PaymentReconciliation4Bto5'
/// title = 'FML Conversion for PaymentReconciliation: R4B to R5'
/// status = 'active'

conceptmap "NoteType" {
  prefix s = "http://hl7.org/fhir/4.3/note-type"
  prefix t = "http://hl7.org/fhir/note-type"

  s:display - t:display
  s:print - t:print
  s:printoper - t:printoper
}

conceptmap "PaymentOutcome" {
  prefix s = "http://hl7.org/fhir/4.3/remittance-outcome"
  prefix t = "http://hl7.org/fhir/payment-outcome"

  s:queued - t:queued
  s:complete - t:complete
  s:error - t:error
  s:partial - t:partial
}

conceptmap "PaymentReconciliationStatus" {
  prefix s = "http://hl7.org/fhir/4.3/fm-status"
  prefix t = "http://hl7.org/fhir/fm-status"

  s:active - t:active
  s:cancelled - t:cancelled
  s:draft - t:draft
  s:"entered-in-error" - t:"entered-in-error"
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/PaymentReconciliation" alias PaymentReconciliationR4B as source
uses "http://hl7.org/fhir/StructureDefinition/PaymentReconciliation" alias PaymentReconciliationR5 as target

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

group PaymentReconciliation(source src : PaymentReconciliationR4B, target tgt : PaymentReconciliationR5) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.status as v -> tgt.status = translate(v, '#PaymentReconciliationStatus', 'code'); // src.type -> tgt.type;
  src.period -> tgt.period; // src.kind -> tgt.kind;
  src.created -> tgt.created;
  src.paymentIssuer -> tgt.paymentIssuer; // src.enterer -> tgt.enterer;
  src.request -> tgt.request;
  src.requestor -> tgt.requestor;
  src.outcome as v -> tgt.outcome = translate(v, '#PaymentOutcome', 'code');
  src.disposition -> tgt.disposition;
  src.paymentDate -> tgt.date;
  src.paymentAmount -> tgt.amount; // src.location -> tgt.location;
  src.paymentIdentifier -> tgt.paymentIdentifier;
  src.detail as s -> tgt.allocation as t then PaymentReconciliationAllocation(s, t);
  src.formCode -> tgt.formCode;
  src.processNote as s -> tgt.processNote as t then PaymentReconciliationProcessNote(s, t);
}

group PaymentReconciliationAllocation(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.predecessor -> tgt.predecessor;
  src.type -> tgt.type; // src.target -> tgt.target;
  src.submitter -> tgt.submitter;
  src.response -> tgt.response;
  src.date -> tgt.date;
  src.responsible -> tgt.responsible;
  src.payee -> tgt.payee;
  src.amount -> tgt.amount;
}

group PaymentReconciliationProcessNote(source src, target tgt) extends BackboneElement {
  src.type as v -> tgt.type = translate(v, '#NoteType', 'code');
  src.text -> tgt.text;
}