Current Build

Переводит команда Health Samurai . Приглашаем поучаствовать в русификации стандарта FHIR: GitHub , Email.

Orders and Observations Work GroupMaturity Level: N/ABallot Status: Informative Compartments: Device, Patient, Practitioner

R3 : R4 Conversion maps for Specimen.

Functional status for this map: 4 tests that all execute ok. All tests pass round-trip testing and 2 r3 resources are invalid (0 errors). (see documentation)

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

uses "http://hl7.org/fhir/3.0/StructureDefinition/Specimen" alias SpecimenR3 as source
uses "http://hl7.org/fhir/StructureDefinition/Specimen" alias Specimen as target

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

group Specimen(source src : SpecimenR3, target tgt : Specimen) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.accessionIdentifier -> tgt.accessionIdentifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.subject -> tgt.subject;
  src.receivedTime -> tgt.receivedTime;
  src.parent -> tgt.parent;
  src.request -> tgt.request;
  src.collection as vs0 -> tgt.collection as vt0 then {
    vs0.collector -> vt0.collector;
    vs0.collected : dateTime as vs -> vt0.collected = create("dateTime") as vt then dateTime(vs, vt);
    vs0.collected : Period as vs -> vt0.collected = create("Period") as vt then Period(vs, vt);
    vs0.quantity -> vt0.quantity;
    vs0.method -> vt0.method;
    vs0.bodySite -> vt0.bodySite;
  };
  src.processing as vs0 -> tgt.processing as vt0 then {
    vs0.description -> vt0.description;
    vs0.procedure -> vt0.procedure;
    vs0.additive -> vt0.additive;
    vs0.time : dateTime as vs -> vt0.time = create("dateTime") as vt then dateTime(vs, vt);
    vs0.time : Period as vs -> vt0.time = create("Period") as vt then Period(vs, vt);
  };
  src.container as vs0 -> tgt.container as vt0 then {
    vs0.identifier -> vt0.identifier;
    vs0.description -> vt0.description;
    vs0.type -> vt0.type;
    vs0.capacity -> vt0.capacity;
    vs0.specimenQuantity -> vt0.specimenQuantity;
    vs0.additive : CodeableConcept as vs -> vt0.additive = create("CodeableConcept") as vt then CodeableConcept(vs, vt);
    vs0.additive : Reference as vs -> vt0.additive = create("Reference") as vt then Reference(vs, vt);
  };
  src.note -> tgt.note;
}


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

uses "http://hl7.org/fhir/StructureDefinition/Specimen" alias Specimen as source
uses "http://hl7.org/fhir/3.0/StructureDefinition/Specimen" alias SpecimenR3 as target

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

group Specimen(source src : Specimen, target tgt : SpecimenR3) extends DomainResource <<type+>> {
  src.identifier -> tgt.identifier;
  src.accessionIdentifier -> tgt.accessionIdentifier;
  src.status -> tgt.status;
  src.type -> tgt.type;
  src.subject -> tgt.subject;
  src.receivedTime -> tgt.receivedTime;
  src.parent -> tgt.parent;
  src.request -> tgt.request;
  src.collection as vs0 -> tgt.collection as vt0 then {
    vs0.collector -> vt0.collector;
    vs0.collected : dateTime as vs -> vt0.collected = create("dateTime") as vt then dateTime(vs, vt);
    vs0.collected : Period as vs -> vt0.collected = create("Period") as vt then Period(vs, vt);
    vs0.quantity -> vt0.quantity;
    vs0.method -> vt0.method;
    vs0.bodySite -> vt0.bodySite;
  };
  src.processing as vs0 -> tgt.processing as vt0 then {
    vs0.description -> vt0.description;
    vs0.procedure -> vt0.procedure;
    vs0.additive -> vt0.additive;
    vs0.time : dateTime as vs -> vt0.time = create("dateTime") as vt then dateTime(vs, vt);
    vs0.time : Period as vs -> vt0.time = create("Period") as vt then Period(vs, vt);
  };
  src.container as vs0 -> tgt.container as vt0 then {
    vs0.identifier -> vt0.identifier;
    vs0.description -> vt0.description;
    vs0.type -> vt0.type;
    vs0.capacity -> vt0.capacity;
    vs0.specimenQuantity -> vt0.specimenQuantity;
    vs0.additive : CodeableConcept as vs -> vt0.additive = create("CodeableConcept") as vt then CodeableConcept(vs, vt);
    vs0.additive : Reference as vs -> vt0.additive = create("Reference") as vt then Reference(vs, vt);
  };
  src.note -> tgt.note;
}


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