FHIR Extensions Pack v1.0.0 (2023-03-26)

This page is part of the FHIR Core Extensions Registry (v1.0.0: Releases) based on FHIR v5.0.0. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Security Work GroupMaturity Level: N/AStandards Status: InformativeSecurity Category: N/A Compartments: N/A

Following are maps for converting between the equivalent R4B resource and this R5 resource.

Maps to AuditEvent

FML Conversion for AuditEvent: R5 to R4 (Ready for Use/Trial Use)

/// url = 'http://hl7.org/fhir/StructureMap/AuditEvent5to4'
/// name = 'AuditEvent5to4'
/// title = 'FML Conversion for AuditEvent: R5 to R4'
/// status = 'active'

conceptmap "AuditEventAction" {
  prefix s = "http://hl7.org/fhir/audit-event-action"
  prefix t = "http://hl7.org/fhir/4.0/audit-event-action"

  s:C - t:C
  s:R - t:R
  s:U - t:U
  s:D - t:D
  s:E - t:E
}

uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias AuditEventR5 as source
uses "http://hl7.org/fhir/4.0/StructureDefinition/AuditEvent" alias AuditEventR4 as target

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

group AuditEvent(source src : AuditEventR5, target tgt : AuditEventR4) extends DomainResource <<type+>> {
  src.category -> tgt.type;
  src.code -> tgt.subtype;
  src.action as v -> tgt.action = translate(v, '#AuditEventAction', 'code');
  src.recorded -> tgt.recorded; // src.severity as v -> tgt.severity = translate(v, '#AuditEventSeverity', 'code');
  src.outcome as s -> tgt.outcome as t then AuditEventOutcome(s, t);
  src.outcome as s -> tgt.outcomeDesc as t then AuditEventOutcomeDesc(s, t);
  src.agent as s -> tgt.agent as t then AuditEventAgent(s, t); // src.authorization -> tgt.authorization;
  src.source as s -> tgt.source as t then AuditEventSource(s, t);
  src.entity as s -> tgt.entity as t then AuditEventEntity(s, t);
}

group AuditEventOutcome(source src, target tgt) extends BackboneElement {
  src.code as s where code = 'success' -> tgt = '0'; // src.code -> tgt.code;
  src.code as s where code = 'information' -> tgt = '0';
  src.code as s where code = 'warning' -> tgt = '4';
  src.code as s where code = 'error' -> tgt = '8';
  src.code as s where code = 'fatal' -> tgt = '12';
}

group AuditEventOutcomeDesc(source src, target tgt) extends BackboneElement {
  src.code as s -> tgt = s.display;
}

group AuditEventAgent(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.role -> tgt.role;
  src.who -> tgt.who;
  src.requestor -> tgt.requestor;
  src.location -> tgt.location;
  src.policy -> tgt.policy;
  src.network : Reference as v ->  tgt.network as t,  t.address = v.display;
  src.network : uri as v ->  tgt.network as t,  t.address = v;
  src.network : string as v ->  tgt.network as t,  t.address = v;
  src.authorization -> tgt.purposeOfUse;
}

group AuditEventSource(source src, target tgt) extends BackboneElement {
  src.site : Reference as s -> tgt then {
    s.display -> tgt.site;
  };
  src.observer -> tgt.observer;
  src.type -> tgt.type;
}

group AuditEventEntity(source src, target tgt) extends BackboneElement {
  src.what -> tgt.what;
  src.role -> tgt.role;
  src.securityLabel -> tgt.securityLabel;
  src.query -> tgt.query;
  src.detail as s -> tgt.detail as t then AuditEventEntityDetail(s, t);
}

group AuditEventEntityDetail(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : Quantity -> tgt.value;
  src.value : CodeableConcept -> tgt.value;
  src.value : string -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : integer -> tgt.value;
  src.value : Range -> tgt.value;
  src.value : Ratio -> tgt.value;
  src.value : time -> tgt.value;
  src.value : dateTime -> tgt.value;
  src.value : Period -> tgt.value;
  src.value : base64Binary -> tgt.value;
}

FML Conversion for AuditEvent: R5 to R4B (Ready for Use/Trial Use)

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

conceptmap "AuditEventAction" {
  prefix s = "http://hl7.org/fhir/audit-event-action"
  prefix t = "http://hl7.org/fhir/4.3/audit-event-action"

  s:C - t:C
  s:R - t:R
  s:U - t:U
  s:D - t:D
  s:E - t:E
}

uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias AuditEventR5 as source
uses "http://hl7.org/fhir/4.3/StructureDefinition/AuditEvent" alias AuditEventR4B as target

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

group AuditEvent(source src : AuditEventR5, target tgt : AuditEventR4B) extends DomainResource <<type+>> {
  src.category -> tgt.type;
  src.code -> tgt.subtype;
  src.action as v -> tgt.action = translate(v, '#AuditEventAction', 'code');
  src.recorded -> tgt.recorded; // src.severity as v -> tgt.severity = translate(v, '#AuditEventSeverity', 'code');
  src.outcome as s -> tgt.outcome as t then AuditEventOutcome(s, t);
  src.outcome as s -> tgt.outcomeDesc as t then AuditEventOutcomeDesc(s, t);
  src.agent as s -> tgt.agent as t then AuditEventAgent(s, t); // src.authorization -> tgt.authorization;
  src.source as s -> tgt.source as t then AuditEventSource(s, t);
  src.entity as s -> tgt.entity as t then AuditEventEntity(s, t);
}

group AuditEventOutcome(source src, target tgt) extends BackboneElement {
  src.code as s where code = 'success' -> tgt = '0'; // src.code -> tgt.code;
  src.code as s where code = 'information' -> tgt = '0';
  src.code as s where code = 'warning' -> tgt = '4';
  src.code as s where code = 'error' -> tgt = '8';
  src.code as s where code = 'fatal' -> tgt = '12';
}

group AuditEventOutcomeDesc(source src, target tgt) extends BackboneElement {
  src.code as s -> tgt = s.display;
}

group AuditEventAgent(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.role -> tgt.role;
  src.who -> tgt.who;
  src.requestor -> tgt.requestor;
  src.location -> tgt.location;
  src.policy -> tgt.policy;
  src.network : Reference as v ->  tgt.network as t,  t.address = v.display;
  src.network : uri as v ->  tgt.network as t,  t.address = v;
  src.network : string as v ->  tgt.network as t,  t.address = v;
  src.authorization -> tgt.purposeOfUse;
}

group AuditEventSource(source src, target tgt) extends BackboneElement {
  src.site : Reference as s -> tgt then {
    s.display -> tgt.site;
  };
  src.observer -> tgt.observer;
  src.type -> tgt.type;
}

group AuditEventEntity(source src, target tgt) extends BackboneElement {
  src.what -> tgt.what;
  src.role -> tgt.role;
  src.securityLabel -> tgt.securityLabel;
  src.query -> tgt.query;
  src.detail as s -> tgt.detail as t then AuditEventEntityDetail(s, t);
}

group AuditEventEntityDetail(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : Quantity -> tgt.value;
  src.value : CodeableConcept -> tgt.value;
  src.value : string -> tgt.value;
  src.value : boolean -> tgt.value;
  src.value : integer -> tgt.value;
  src.value : Range -> tgt.value;
  src.value : Ratio -> tgt.value;
  src.value : time -> tgt.value;
  src.value : dateTime -> tgt.value;
  src.value : Period -> tgt.value;
  src.value : base64Binary -> tgt.value;
}

Maps from AuditEvent

FML Conversion for AuditEvent: R4B to R5 (Ready for Use/Trial Use)

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

conceptmap "AuditEventAction" {
  prefix s = "http://hl7.org/fhir/4.3/audit-event-action"
  prefix t = "http://hl7.org/fhir/audit-event-action"

  s:C - t:C
  s:R - t:R
  s:U - t:U
  s:D - t:D
  s:E - t:E
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/AuditEvent" alias AuditEventR4B as source
uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias AuditEventR5 as target

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

group AuditEvent(source src : AuditEventR4B, target tgt : AuditEventR5) extends DomainResource <<type+>> {
  src.type -> tgt.category;
  src.subtype -> tgt.code;
  src.action as v -> tgt.action = translate(v, '#AuditEventAction', 'code');
  src.recorded -> tgt.recorded; // src.severity as v -> tgt.severity = translate(v, '#AuditEventSeverity', 'code');
  src.outcome as s where outcome = '0' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'success',  tc.display = 'Success';
  src.outcome as s where outcome = '4' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'warning',  tc.display = 'Warning';
  src.outcome as s where outcome = '8' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'error',  tc.display = 'error';
  src.outcome as s where outcome = '12' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'fatal',  tc.display = 'Fatal';
  src.agent as s -> tgt.agent as t then AuditEventAgent(s, t); // src.authorization -> tgt.authorization;
  src.source as s -> tgt.source as t then AuditEventSource(s, t);
  src.entity as s -> tgt.entity as t then AuditEventEntity(s, t);
}

// group AuditEventOutcome(source src, target tgt) extends BackboneElement {
// src.code -> tgt.code;
// src.detail -> tgt.detail;
// }
group AuditEventAgent(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.role -> tgt.role;
  src.who -> tgt.who;
  src.requestor -> tgt.requestor;
  src.location -> tgt.location;
  src.policy -> tgt.policy;
  src.network as v -> tgt then {
    v.address -> tgt.network "network";
  }; // src.network : Reference -> tgt.network;
  src.purposeOfUse -> tgt.authorization;
}

group AuditEventSource(source src, target tgt) extends BackboneElement {
  src.site as v ->  tgt.site = create('Reference') as t,  t.display = v;
  src.observer -> tgt.observer;
  src.type -> tgt.type;
}

group AuditEventEntity(source src, target tgt) extends BackboneElement {
  src.what -> tgt.what;
  src.role -> tgt.role;
  src.securityLabel -> tgt.securityLabel;
  src.query -> tgt.query;
  src.detail as s -> tgt.detail as t then AuditEventEntityDetail(s, t);
}

group AuditEventEntityDetail(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : string -> tgt.value; // src.value : Quantity -> tgt.value;
  src.value : base64Binary -> tgt.value; // src.value : boolean -> tgt.value;
}

FML Conversion for AuditEvent: R4 to R5 (Ready for Use/Trial Use)

/// url = 'http://hl7.org/fhir/StructureMap/AuditEvent4to5'
/// name = 'AuditEvent4to5'
/// title = 'FML Conversion for AuditEvent: R4 to R5'
/// status = 'active'

conceptmap "AuditEventAction" {
  prefix s = "http://hl7.org/fhir/4.0/audit-event-action"
  prefix t = "http://hl7.org/fhir/audit-event-action"

  s:C - t:C
  s:R - t:R
  s:U - t:U
  s:D - t:D
  s:E - t:E
}

uses "http://hl7.org/fhir/4.0/StructureDefinition/AuditEvent" alias AuditEventR4 as source
uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias AuditEventR5 as target

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

group AuditEvent(source src : AuditEventR4, target tgt : AuditEventR5) extends DomainResource <<type+>> {
  src.type -> tgt.category;
  src.subtype -> tgt.code;
  src.action as v -> tgt.action = translate(v, '#AuditEventAction', 'code');
  src.recorded -> tgt.recorded; // src.severity as v -> tgt.severity = translate(v, '#AuditEventSeverity', 'code');
  src.outcome as s where outcome = '0' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'success',  tc.display = 'Success';
  src.outcome as s where outcome = '4' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'warning',  tc.display = 'Warning';
  src.outcome as s where outcome = '8' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'error',  tc.display = 'error';
  src.outcome as s where outcome = '12' ->  tgt.outcome as t,  t.code = create('Coding') as tc,  tc.system = 'http://hl7.org/fhir/issue-severity',  tc.code = 'fatal',  tc.display = 'Fatal';
  src.agent as s -> tgt.agent as t then AuditEventAgent(s, t); // src.authorization -> tgt.authorization;
  src.source as s -> tgt.source as t then AuditEventSource(s, t);
  src.entity as s -> tgt.entity as t then AuditEventEntity(s, t);
}

// group AuditEventOutcome(source src, target tgt) extends BackboneElement {
// src.code -> tgt.code;
// src.detail -> tgt.detail;
// }
group AuditEventAgent(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.role -> tgt.role;
  src.who -> tgt.who;
  src.requestor -> tgt.requestor;
  src.location -> tgt.location;
  src.policy -> tgt.policy;
  src.network as v -> tgt then {
    v.address -> tgt.network;
  }; // src.network : Reference -> tgt.network;
  src.purposeOfUse -> tgt.authorization;
}

group AuditEventSource(source src, target tgt) extends BackboneElement {
  src.site as v ->  tgt.site = create('Reference') as t,  t.display = v;
  src.observer -> tgt.observer;
  src.type -> tgt.type;
}

group AuditEventEntity(source src, target tgt) extends BackboneElement {
  src.what -> tgt.what;
  src.role -> tgt.role;
  src.securityLabel -> tgt.securityLabel;
  src.query -> tgt.query;
  src.detail as s -> tgt.detail as t then AuditEventEntityDetail(s, t);
}

group AuditEventEntityDetail(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value : string -> tgt.value; // src.value : Quantity -> tgt.value;
  src.value : base64Binary -> tgt.value; // src.value : boolean -> tgt.value;
}