FHIR Extensions Pack
1.0.0 - Working Copy International flag

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

StructureMap: FML Conversion for Citation: R4B to R5

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

FMLConversionforCitationR4BtoR5

/// url = 'http://hl7.org/fhir/StructureMap/Citation4Bto5'
/// name = 'Citation4Bto5'
/// title = 'FML Conversion for Citation: R4B to R5'
/// status = 'draft'

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

  s:draft - t:draft
  s:active - t:active
  s:retired - t:retired
  s:unknown - t:unknown
}

uses "http://hl7.org/fhir/4.3/StructureDefinition/Citation" alias CitationR4B as source
uses "http://hl7.org/fhir/StructureDefinition/Citation" alias CitationR5 as target

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

group Citation(source src : CitationR4B, target tgt : CitationR5) extends DomainResource <<type+>> {
  src.url -> tgt.url;
  src.identifier -> tgt.identifier;
  src.version -> tgt.version;
  src.name -> tgt.name; // src.versionAlgorithm : string -> tgt.versionAlgorithm;
  src.title -> tgt.title;
  src.status as v -> tgt.status = translate(v, '#PublicationStatus', 'code');
  src.experimental -> tgt.experimental;
  src.date -> tgt.date;
  src.publisher -> tgt.publisher;
  src.contact -> tgt.contact;
  src.description -> tgt.description;
  src.useContext -> tgt.useContext;
  src.jurisdiction -> tgt.jurisdiction;
  src.purpose -> tgt.purpose;
  src.copyright -> tgt.copyright;
  src.approvalDate -> tgt.approvalDate; // src.copyrightLabel -> tgt.copyrightLabel;
  src.lastReviewDate -> tgt.lastReviewDate;
  src.effectivePeriod -> tgt.effectivePeriod;
  src.author -> tgt.author;
  src.editor -> tgt.editor;
  src.reviewer -> tgt.reviewer;
  src.endorser -> tgt.endorser;
  src.summary as s -> tgt.summary as t then CitationSummary(s, t);
  src.classification as s -> tgt.classification as t then CitationClassification(s, t);
  src.note -> tgt.note;
  src.currentState -> tgt.currentState;
  src.statusDate as s -> tgt.statusDate as t then CitationStatusDate(s, t);
  src.relatesTo as s -> tgt.relatedArtifact as t then {
    s.relationshipType as v -> t.type = v.code "type";
    s.targetClassifier -> t.classifier;
    s.target : Reference -> t.resourceReference;
  } "relatedArtifact";
  src.citedArtifact as s -> tgt.citedArtifact as t then CitationCitedArtifact(s, t);
}

group CitationSummary(source src, target tgt) extends BackboneElement {
  src.style -> tgt.style;
  src.text -> tgt.text;
}

group CitationClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classifier -> tgt.classifier;
}

group CitationStatusDate(source src, target tgt) extends BackboneElement {
  src.activity -> tgt.activity;
  src.actual -> tgt.actual;
  src.period -> tgt.period;
}

group CitationCitedArtifact(source src, target tgt) extends BackboneElement {
  src.identifier -> tgt.identifier;
  src.relatedIdentifier -> tgt.relatedIdentifier;
  src.dateAccessed -> tgt.dateAccessed;
  src.version as s -> tgt.version as t then CitationCitedArtifactVersion(s, t);
  src.currentState -> tgt.currentState;
  src.statusDate as s -> tgt.statusDate as t then CitationCitedArtifactStatusDate(s, t);
  src.title as s -> tgt.title as t then CitationCitedArtifactTitle(s, t);
  src.abstract as s -> tgt.abstract as t then CitationCitedArtifactAbstract(s, t);
  src.part as s -> tgt.part as t then CitationCitedArtifactPart(s, t);
  src.relatesTo as s -> tgt.relatesTo as t then CitationCitedArtifactRelatesTo(s, t);
  src.publicationForm as s -> tgt.publicationForm as t then CitationCitedArtifactPublicationForm(s, t);
  src.webLocation as s -> tgt.webLocation as t then CitationCitedArtifactWebLocation(s, t);
  src.classification as s -> tgt.classification as t then CitationCitedArtifactClassification(s, t);
  src.contributorship as s -> tgt.contributorship as t then CitationCitedArtifactContributorship(s, t);
  src.note -> tgt.note;
}

group CitationCitedArtifactVersion(source src, target tgt) extends BackboneElement {
  src.value -> tgt.value;
  src.baseCitation -> tgt.baseCitation;
}

group CitationCitedArtifactStatusDate(source src, target tgt) extends BackboneElement {
  src.activity -> tgt.activity;
  src.actual -> tgt.actual;
  src.period -> tgt.period;
}

group CitationCitedArtifactTitle(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.language -> tgt.language;
  src.text -> tgt.text;
}

group CitationCitedArtifactAbstract(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.language -> tgt.language;
  src.text -> tgt.text;
  src.copyright -> tgt.copyright;
}

group CitationCitedArtifactPart(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.value -> tgt.value;
  src.baseCitation -> tgt.baseCitation;
}

group CitationCitedArtifactRelatesTo(source src, target tgt) extends BackboneElement {
  src.relationshipType as v -> tgt.type = v.code "type"; // src.type -> tgt.type;
  src.targetClassifier -> tgt.classifier;
  src.target : Reference -> tgt.resourceReference;
}

group CitationCitedArtifactPublicationForm(source src, target tgt) extends BackboneElement {
  src.publishedIn as s -> tgt.publishedIn as t then CitationCitedArtifactPublicationFormPublishedIn(s, t);
  src.periodicRelease as s -> tgt then {
    s.citedMedium -> tgt.citedMedium;
    s.volume -> tgt.volume;
    s.issue -> tgt.issue;
    s.dateOfPublication as sd -> tgt then {
      sd.text -> tgt.publicationDateText;
      sd.season -> tgt.publicationDateSeason;
    };
  }; // src.citedMedium -> tgt.citedMedium;
  src.articleDate -> tgt.articleDate;
  src.lastRevisionDate -> tgt.lastRevisionDate;
  src.language -> tgt.language;
  src.accessionNumber -> tgt.accessionNumber;
  src.pageString -> tgt.pageString;
  src.firstPage -> tgt.firstPage;
  src.lastPage -> tgt.lastPage;
  src.pageCount -> tgt.pageCount;
  src.copyright -> tgt.copyright;
}

group CitationCitedArtifactPublicationFormPublishedIn(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.identifier -> tgt.identifier;
  src.title -> tgt.title;
  src.publisher -> tgt.publisher;
  src.publisherLocation -> tgt.publisherLocation;
}

group CitationCitedArtifactWebLocation(source src, target tgt) extends BackboneElement {
  src.type -> tgt.classifier;
  src.url -> tgt.url;
}

group CitationCitedArtifactClassification(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.classifier -> tgt.classifier;
}

group CitationCitedArtifactContributorship(source src, target tgt) extends BackboneElement {
  src.complete -> tgt.complete;
  src.entry as s -> tgt.entry as t then CitationCitedArtifactContributorshipEntry(s, t);
  src.summary as s -> tgt.summary as t then CitationCitedArtifactContributorshipSummary(s, t);
}

group CitationCitedArtifactContributorshipEntry(source src, target tgt) extends BackboneElement {
  src.initials -> tgt.forenameInitials; // src.contributor -> tgt.contributor;
  src.contributionType -> tgt.contributionType; // src.affiliation -> tgt.affiliation;
  src.role -> tgt.role;
  src.contributionInstance as s -> tgt.contributionInstance as t then CitationCitedArtifactContributorshipEntryContributionInstance(s, t);
  src.correspondingContact -> tgt.correspondingContact;
  src.listOrder -> tgt.rankingOrder;
}

group CitationCitedArtifactContributorshipEntryContributionInstance(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.time -> tgt.time;
}

group CitationCitedArtifactContributorshipSummary(source src, target tgt) extends BackboneElement {
  src.type -> tgt.type;
  src.style -> tgt.style;
  src.source -> tgt.source;
  src.value -> tgt.value;
}