Merge pull request #82 from rhausam/conceptmap-updates-rh

Core updates required for ConceptMap changes.
This commit is contained in:
Grahame Grieve 2019-09-18 22:17:19 +10:00 committed by GitHub
commit f4a2867735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 389 additions and 488 deletions

View File

@ -3915,7 +3915,11 @@ public class VersionConvertor_10_50 {
org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent();
copyElement(src, tgt);
tgt.setCode(src.getCode());
tgt.addTarget(convertTargetElementComponent(t));
if (t.getEquivalence() == org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
tgt.setNoMap(true);
} else {
tgt.addTarget(convertTargetElementComponent(t));
}
res.add(new SourceElementComponentWrapper(tgt, src.getCodeSystem(), t.getCodeSystem()));
}
return res;
@ -3928,8 +3932,13 @@ public class VersionConvertor_10_50 {
copyElement(src, tgt);
tgt.setCodeSystem(g.getSource());
tgt.setCode(src.getCode());
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t, g));
if (src.hasNoMap() && src.getNoMap() == true) {
tgt.addTarget(new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
}
else {
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t, g));
}
return tgt;
}
@ -3939,7 +3948,7 @@ public class VersionConvertor_10_50 {
org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent();
copyElement(src, tgt);
tgt.setCode(src.getCode());
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence()));
tgt.setComment(src.getComments());
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
tgt.addDependsOn(convertOtherElementComponent(t));
@ -3955,7 +3964,7 @@ public class VersionConvertor_10_50 {
copyElement(src, tgt);
tgt.setCodeSystem(g.getTarget());
tgt.setCode(src.getCode());
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship()));
tgt.setComments(src.getComment());
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
tgt.addDependsOn(convertOtherElementComponent(t));
@ -3964,36 +3973,31 @@ public class VersionConvertor_10_50 {
return tgt;
}
public org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship convertConceptMapRelationship(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NULL;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NOTRELATEDTO;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
}
}
public org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EQUIVALENT: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case BROADER: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.WIDER;
case NARROWER: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.DISJOINT;
case NOTRELATEDTO: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.NULL;
}
}

View File

@ -3252,7 +3252,11 @@ public class VersionConvertor_14_50 {
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(src.getCode());
tgt.addTarget(convertTargetElementComponent(t));
if (t.getEquivalence() == org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
tgt.setNoMap(true);
} else {
tgt.addTarget(convertTargetElementComponent(t));
}
res.add(new SourceElementComponentWrapper(tgt, src.getSystem(), t.getSystem()));
}
return res;
@ -3267,8 +3271,13 @@ public class VersionConvertor_14_50 {
tgt.setSystem(g.getSource());
if (src.hasCode())
tgt.setCode(src.getCode());
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t, g));
if (src.hasNoMap() && src.getNoMap() == true) {
tgt.addTarget(new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
}
else {
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t, g));
}
return tgt;
}
@ -3279,7 +3288,7 @@ public class VersionConvertor_14_50 {
copyElement(src, tgt);
if (src.hasCode())
tgt.setCode(src.getCode());
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence()));
if (src.hasComments())
tgt.setComment(src.getComments());
for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
@ -3298,7 +3307,7 @@ public class VersionConvertor_14_50 {
tgt.setSystem(g.getTarget());
if (src.hasCode())
tgt.setCode(src.getCode());
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship()));
if (src.hasComment())
tgt.setComments(src.getComment());
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
@ -3308,36 +3317,31 @@ public class VersionConvertor_14_50 {
return tgt;
}
public static org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public static org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship convertConceptMapRelationship(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NULL;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NOTRELATEDTO;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
}
}
public static org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public static org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case EQUIVALENT: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case BROADER: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.WIDER;
case NARROWER: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.DISJOINT;
case NOTRELATEDTO: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.NULL;
}
}

View File

@ -7999,7 +7999,11 @@ public class VersionConvertor_30_50 {
if (src.hasDisplay())
tgt.setDisplay(src.getDisplay());
for (org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
if (t.getEquivalence() == org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
tgt.setNoMap(true);
} else {
tgt.addTarget(convertTargetElementComponent(t));
}
return tgt;
}
@ -8012,8 +8016,13 @@ public class VersionConvertor_30_50 {
tgt.setCode(src.getCode());
if (src.hasDisplay())
tgt.setDisplay(src.getDisplay());
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
if (src.hasNoMap() && src.getNoMap() == true) {
tgt.addTarget(new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
}
else {
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
}
return tgt;
}
@ -8027,7 +8036,7 @@ public class VersionConvertor_30_50 {
if (src.hasDisplay())
tgt.setDisplay(src.getDisplay());
if (src.hasEquivalence())
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
tgt.setRelationship(convertConceptMapRelationship(src.getEquivalence()));
if (src.hasComment())
tgt.setComment(src.getComment());
for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
@ -8046,8 +8055,8 @@ public class VersionConvertor_30_50 {
tgt.setCode(src.getCode());
if (src.hasDisplay())
tgt.setDisplay(src.getDisplay());
if (src.hasEquivalence())
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
if (src.hasRelationship())
tgt.setEquivalence(convertConceptMapEquivalence(src.getRelationship()));
if (src.hasComment())
tgt.setComment(src.getComment());
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
@ -8057,38 +8066,33 @@ public class VersionConvertor_30_50 {
return tgt;
}
private static org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
private static org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship convertConceptMapRelationship(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RELATEDTO: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NULL;
case RELATEDTO: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NOTRELATEDTO;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
}
}
private static org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
private static org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RELATEDTO: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case BROADER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.WIDER;
case NARROWER: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.DISJOINT;
case NOTRELATEDTO: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.NULL;
}
}

View File

@ -198,7 +198,11 @@ public class ConceptMap extends VersionConvertor_40_50 {
if (src.hasDisplay())
tgt.setDisplayElement(convertString(src.getDisplayElement()));
for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
if (t.getEquivalence() == org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED) {
tgt.setNoMap(true);
} else {
tgt.addTarget(convertTargetElementComponent(t));
}
return tgt;
}
@ -211,8 +215,13 @@ public class ConceptMap extends VersionConvertor_40_50 {
tgt.setCodeElement(convertCode(src.getCodeElement()));
if (src.hasDisplay())
tgt.setDisplayElement(convertString(src.getDisplayElement()));
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
if (src.hasNoMap() && src.getNoMap() == true) {
tgt.addTarget(new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED));
}
else {
for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget())
tgt.addTarget(convertTargetElementComponent(t));
}
return tgt;
}
@ -226,7 +235,7 @@ public class ConceptMap extends VersionConvertor_40_50 {
if (src.hasDisplay())
tgt.setDisplayElement(convertString(src.getDisplayElement()));
if (src.hasEquivalence())
tgt.setEquivalence(Enumerations.convertConceptMapEquivalence(src.getEquivalence()));
tgt.setRelationship(Enumerations.convertConceptMapRelationship(src.getEquivalence()));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn())
@ -245,8 +254,8 @@ public class ConceptMap extends VersionConvertor_40_50 {
tgt.setCodeElement(convertCode(src.getCodeElement()));
if (src.hasDisplay())
tgt.setDisplayElement(convertString(src.getDisplayElement()));
if (src.hasEquivalence())
tgt.setEquivalence(Enumerations.convertConceptMapEquivalence(src.getEquivalence()));
if (src.hasRelationship())
tgt.setEquivalence(Enumerations.convertConceptMapEquivalence(src.getRelationship()));
if (src.hasComment())
tgt.setCommentElement(convertString(src.getCommentElement()));
for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn())

View File

@ -222,38 +222,33 @@ public class Enumerations extends VersionConvertor_40_50 {
}
}
public static org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public static org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship convertConceptMapRelationship(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RELATEDTO: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence.NULL;
case RELATEDTO: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.EQUIVALENT;
case WIDER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case SUBSUMES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.BROADER;
case NARROWER: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NARROWER;
case INEXACT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.RELATEDTO;
case UNMATCHED: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
case DISJOINT: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NOTRELATEDTO;
default: return org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship.NULL;
}
}
public static org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence src) throws FHIRException {
public static org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence convertConceptMapEquivalence(org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship src) throws FHIRException {
if (src == null)
return null;
switch (src) {
case RELATEDTO: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.RELATEDTO;
case EQUIVALENT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUIVALENT;
case EQUAL: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.EQUAL;
case WIDER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER;
case SUBSUMES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SUBSUMES;
case BROADER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.WIDER;
case NARROWER: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NARROWER;
case SPECIALIZES: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.SPECIALIZES;
case INEXACT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.INEXACT;
case UNMATCHED: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED;
case DISJOINT: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT;
case NOTRELATEDTO: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.DISJOINT;
default: return org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.NULL;
}
}

View File

@ -40,7 +40,7 @@ import org.hl7.fhir.r5.formats.JsonParser;
import org.hl7.fhir.r5.model.ConceptMap;
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.utilities.CSVReader;
import org.hl7.fhir.utilities.TextFile;
@ -133,7 +133,7 @@ public class SearchParameterProcessor {
String d = sp.getByCode(dst);
if (!Utilities.noString(s) && !Utilities.noString(d)) {
SourceElementComponent e = makeElement(s, group);
e.addTarget().setCode(d).setEquivalence(ConceptMapEquivalence.RELATEDTO);
e.addTarget().setCode(d).setRelationship(ConceptMapRelationship.RELATEDTO);
}
}
new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path(ROOT, "ConceptMap-"+map.getId()+".json")), map);

View File

@ -7040,10 +7040,10 @@ public class JsonParser extends JsonParserBase {
res.setDisplayElement(parseString(json.get("display").getAsString()));
if (json.has("_display"))
parseElementProperties(json.getAsJsonObject("_display"), res.getDisplayElement());
if (json.has("equivalence"))
res.setEquivalenceElement(parseEnumeration(json.get("equivalence").getAsString(), Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory()));
if (json.has("_equivalence"))
parseElementProperties(json.getAsJsonObject("_equivalence"), res.getEquivalenceElement());
if (json.has("relationship"))
res.setRelationshipElement(parseEnumeration(json.get("relationship").getAsString(), Enumerations.ConceptMapRelationship.NULL, new Enumerations.ConceptMapRelationshipEnumFactory()));
if (json.has("_relationship"))
parseElementProperties(json.getAsJsonObject("_relationship"), res.getRelationshipElement());
if (json.has("comment"))
res.setCommentElement(parseString(json.get("comment").getAsString()));
if (json.has("_comment"))
@ -36059,9 +36059,9 @@ public class JsonParser extends JsonParserBase {
composeStringCore("display", element.getDisplayElement(), false);
composeStringExtras("display", element.getDisplayElement(), false);
}
if (element.hasEquivalenceElement()) {
composeEnumerationCore("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false);
composeEnumerationExtras("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory(), false);
if (element.hasRelationshipElement()) {
composeEnumerationCore("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
composeEnumerationExtras("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory(), false);
}
if (element.hasCommentElement()) {
composeStringCore("comment", element.getCommentElement(), false);

View File

@ -4537,8 +4537,8 @@ public class RdfParser extends RdfParserBase {
composeCode(t, "ConceptMap", "code", element.getCodeElement(), -1);
if (element.hasDisplayElement())
composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1);
if (element.hasEquivalenceElement())
composeEnum(t, "ConceptMap", "equivalence", element.getEquivalenceElement(), -1);
if (element.hasRelationshipElement())
composeEnum(t, "ConceptMap", "relationship", element.getRelationshipElement(), -1);
if (element.hasCommentElement())
composeString(t, "ConceptMap", "comment", element.getCommentElement(), -1);
for (int i = 0; i < element.getDependsOn().size(); i++)

View File

@ -6187,8 +6187,8 @@ public class XmlParser extends XmlParserBase {
res.setCodeElement(parseCode(xpp));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("display")) {
res.setDisplayElement(parseString(xpp));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("equivalence")) {
res.setEquivalenceElement(parseEnumeration(xpp, Enumerations.ConceptMapEquivalence.NULL, new Enumerations.ConceptMapEquivalenceEnumFactory()));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("relationship")) {
res.setRelationshipElement(parseEnumeration(xpp, Enumerations.ConceptMapRelationship.NULL, new Enumerations.ConceptMapRelationshipEnumFactory()));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("comment")) {
res.setCommentElement(parseString(xpp));
} else if (eventType == XmlPullParser.START_TAG && xpp.getName().equals("dependsOn")) {
@ -31359,8 +31359,8 @@ public class XmlParser extends XmlParserBase {
if (element.hasDisplayElement()) {
composeString("display", element.getDisplayElement());
}
if (element.hasEquivalenceElement())
composeEnumeration("equivalence", element.getEquivalenceElement(), new Enumerations.ConceptMapEquivalenceEnumFactory());
if (element.hasRelationshipElement())
composeEnumeration("relationship", element.getRelationshipElement(), new Enumerations.ConceptMapRelationshipEnumFactory());
if (element.hasCommentElement()) {
composeString("comment", element.getCommentElement());
}

View File

@ -56,8 +56,8 @@ import java.util.List;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalenceEnumFactory;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationshipEnumFactory;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatusEnumFactory;
import org.hl7.fhir.utilities.Utilities;
@ -221,10 +221,10 @@ public class ConceptMap extends MetadataResource {
protected List<SourceElementComponent> element;
/**
* What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.
* What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to.
*/
@Child(name = "unmapped", type = {}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="What to do when there is no mapping for the source concept", formalDefinition="What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched." )
@Description(shortDefinition="What to do when there is no mapping for the source concept", formalDefinition="What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to." )
protected ConceptMapGroupUnmappedComponent unmapped;
private static final long serialVersionUID = 1606357508L;
@ -486,7 +486,7 @@ public class ConceptMap extends MetadataResource {
}
/**
* @return {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.)
* @return {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to.)
*/
public ConceptMapGroupUnmappedComponent getUnmapped() {
if (this.unmapped == null)
@ -502,7 +502,7 @@ public class ConceptMap extends MetadataResource {
}
/**
* @param value {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.)
* @param value {@link #unmapped} (What to do when there is no mapping for the source concept. "Unmapped" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to.)
*/
public ConceptMapGroupComponent setUnmapped(ConceptMapGroupUnmappedComponent value) {
this.unmapped = value;
@ -516,7 +516,7 @@ public class ConceptMap extends MetadataResource {
children.add(new Property("target", "uri", "An absolute URI that identifies the target system that the concepts will be mapped to.", 0, 1, target));
children.add(new Property("targetVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, targetVersion));
children.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element));
children.add(new Property("unmapped", "", "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.", 0, 1, unmapped));
children.add(new Property("unmapped", "", "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to.", 0, 1, unmapped));
}
@Override
@ -527,7 +527,7 @@ public class ConceptMap extends MetadataResource {
case -880905839: /*target*/ return new Property("target", "uri", "An absolute URI that identifies the target system that the concepts will be mapped to.", 0, 1, target);
case -1639412217: /*targetVersion*/ return new Property("targetVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, targetVersion);
case -1662836996: /*element*/ return new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element);
case -194857460: /*unmapped*/ return new Property("unmapped", "", "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched.", 0, 1, unmapped);
case -194857460: /*unmapped*/ return new Property("unmapped", "", "What to do when there is no mapping for the source concept. \"Unmapped\" does not include codes that are unamatched, and the unmapped element is ignored in a code is specified to have relationship = not-related-to.", 0, 1, unmapped);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
@ -721,6 +721,13 @@ public class ConceptMap extends MetadataResource {
private static final long serialVersionUID = -1115258852L;
/**
* noMap = true indicates that there is no target mapping for the source concept.
*/
@Child(name = "noMap", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="No mapping to a target concept for this source concept", formalDefinition="noMap = true indicates that no mapping to a target concept exists for this source concept." )
protected BooleanType noMap;
/**
* Constructor
*/
@ -826,6 +833,51 @@ public class ConceptMap extends MetadataResource {
return this;
}
/**
* @return {@link #noMap} (noMap = true indicates that no mapping to a target concept exists for this source concept.). This is the underlying object with id, value and extensions. The accessor "getNoMap" gives direct access to the value
*/
public BooleanType getNoMapElement() {
if (this.noMap == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SourceElementComponent.noMap");
else if (Configuration.doAutoCreate())
this.noMap = new BooleanType();
return this.noMap;
}
public boolean hasNoMapElement() {
return this.noMap != null && !this.noMap.isEmpty();
}
public boolean hasNoMap() {
return this.noMap != null && !this.noMap.isEmpty();
}
/**
* @param value {@link #source} (noMap = true indicates that no mapping to a target concept exists for this source concept.). This is the underlying object with id, value and extensions. The accessor "getNoMap" gives direct access to the value
*/
public SourceElementComponent setNoMapElement(Boolean value) {
this.noMap = new BooleanType(value);
return this;
}
/**
* @return noMap = true indicates that no mapping to a target concept exists for this source concept.
*/
public Boolean getNoMap() {
return this.noMap == null ? null : this.noMap.getValue();
}
/**
* @param value noMap = true indicates that no mapping to a target concept exists for this source concept.
*/
public SourceElementComponent setNoMap(Boolean value) {
if (this.noMap == null)
this.noMap = new BooleanType();
this.noMap.setValue(value);
return this;
}
/**
* @return {@link #target} (A concept from the target value set that this concept maps to.)
*/
@ -1037,12 +1089,12 @@ public class ConceptMap extends MetadataResource {
protected StringType display;
/**
* The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
* The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).
*/
@Child(name = "equivalence", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false)
@Description(shortDefinition="relatedto | equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/concept-map-equivalence")
protected Enumeration<ConceptMapEquivalence> equivalence;
@Child(name = "relationship", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false)
@Description(shortDefinition="related-to | equivalent | broader | narrower | not-related-to", formalDefinition="The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/concept-map-relationship")
protected Enumeration<ConceptMapRelationship> relationship;
/**
* A description of status/issues in mapping that conveys additional information not represented in the structured data.
@ -1059,10 +1111,10 @@ public class ConceptMap extends MetadataResource {
protected List<OtherElementComponent> dependsOn;
/**
* A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.
* A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the relationship cannot be relied on.
*/
@Child(name = "product", type = {OtherElementComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." )
@Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the relationship cannot be relied on." )
protected List<OtherElementComponent> product;
private static final long serialVersionUID = -2008997477L;
@ -1077,9 +1129,9 @@ public class ConceptMap extends MetadataResource {
/**
* Constructor
*/
public TargetElementComponent(Enumeration<ConceptMapEquivalence> equivalence) {
public TargetElementComponent(Enumeration<ConceptMapRelationship> relationship) {
super();
this.equivalence = equivalence;
this.relationship = relationship;
}
/**
@ -1181,47 +1233,47 @@ public class ConceptMap extends MetadataResource {
}
/**
* @return {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
* @return {@link #relationship} (The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
*/
public Enumeration<ConceptMapEquivalence> getEquivalenceElement() {
if (this.equivalence == null)
public Enumeration<ConceptMapRelationship> getRelationshipElement() {
if (this.relationship == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create TargetElementComponent.equivalence");
throw new Error("Attempt to auto-create TargetElementComponent.relationship");
else if (Configuration.doAutoCreate())
this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory()); // bb
return this.equivalence;
this.relationship = new Enumeration<ConceptMapRelationship>(new ConceptMapRelationshipEnumFactory()); // bb
return this.relationship;
}
public boolean hasEquivalenceElement() {
return this.equivalence != null && !this.equivalence.isEmpty();
public boolean hasRelationshipElement() {
return this.relationship != null && !this.relationship.isEmpty();
}
public boolean hasEquivalence() {
return this.equivalence != null && !this.equivalence.isEmpty();
public boolean hasRelationship() {
return this.relationship != null && !this.relationship.isEmpty();
}
/**
* @param value {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
* @param value {@link #relationship} (The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
*/
public TargetElementComponent setEquivalenceElement(Enumeration<ConceptMapEquivalence> value) {
this.equivalence = value;
public TargetElementComponent setRelationshipElement(Enumeration<ConceptMapRelationship> value) {
this.relationship = value;
return this;
}
/**
* @return The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
* @return The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).
*/
public ConceptMapEquivalence getEquivalence() {
return this.equivalence == null ? null : this.equivalence.getValue();
public ConceptMapRelationship getRelationship() {
return this.relationship == null ? null : this.relationship.getValue();
}
/**
* @param value The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
* @param value The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).
*/
public TargetElementComponent setEquivalence(ConceptMapEquivalence value) {
if (this.equivalence == null)
this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory());
this.equivalence.setValue(value);
public TargetElementComponent setRelationship(ConceptMapRelationship value) {
if (this.relationship == null)
this.relationship = new Enumeration<ConceptMapRelationship>(new ConceptMapRelationshipEnumFactory());
this.relationship.setValue(value);
return this;
}
@ -1328,7 +1380,7 @@ public class ConceptMap extends MetadataResource {
}
/**
* @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.)
* @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the relationship cannot be relied on.)
*/
public List<OtherElementComponent> getProduct() {
if (this.product == null)
@ -1384,10 +1436,10 @@ public class ConceptMap extends MetadataResource {
super.listChildren(children);
children.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, 1, code));
children.add(new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display));
children.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, 1, equivalence));
children.add(new Property("relationship", "code", "The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).", 0, 1, relationship));
children.add(new Property("comment", "string", "A description of status/issues in mapping that conveys additional information not represented in the structured data.", 0, 1, comment));
children.add(new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn));
children.add(new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product));
children.add(new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the relationship cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product));
}
@Override
@ -1395,10 +1447,10 @@ public class ConceptMap extends MetadataResource {
switch (_hash) {
case 3059181: /*code*/ return new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, 1, code);
case 1671764162: /*display*/ return new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display);
case -15828692: /*equivalence*/ return new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, 1, equivalence);
case -261851592: /*relationship*/ return new Property("relationship", "code", "The relationship between the source and target concepts (counting for the dependencies and products). The relationship is read from target to source (e.g. the target is 'broader' than the source).", 0, 1, relationship);
case 950398559: /*comment*/ return new Property("comment", "string", "A description of status/issues in mapping that conveys additional information not represented in the structured data.", 0, 1, comment);
case -1109214266: /*dependsOn*/ return new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn);
case -309474065: /*product*/ return new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product);
case -309474065: /*product*/ return new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the relationship cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
@ -1409,7 +1461,7 @@ public class ConceptMap extends MetadataResource {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
case -15828692: /*equivalence*/ return this.equivalence == null ? new Base[0] : new Base[] {this.equivalence}; // Enumeration<ConceptMapEquivalence>
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ConceptMapRelationship>
case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : this.dependsOn.toArray(new Base[this.dependsOn.size()]); // OtherElementComponent
case -309474065: /*product*/ return this.product == null ? new Base[0] : this.product.toArray(new Base[this.product.size()]); // OtherElementComponent
@ -1427,9 +1479,9 @@ public class ConceptMap extends MetadataResource {
case 1671764162: // display
this.display = castToString(value); // StringType
return value;
case -15828692: // equivalence
value = new ConceptMapEquivalenceEnumFactory().fromType(castToCode(value));
this.equivalence = (Enumeration) value; // Enumeration<ConceptMapEquivalence>
case -261851592: // relationship
value = new ConceptMapRelationshipEnumFactory().fromType(castToCode(value));
this.relationship = (Enumeration) value; // Enumeration<ConceptMapRelationship>
return value;
case 950398559: // comment
this.comment = castToString(value); // StringType
@ -1451,9 +1503,9 @@ public class ConceptMap extends MetadataResource {
this.code = castToCode(value); // CodeType
} else if (name.equals("display")) {
this.display = castToString(value); // StringType
} else if (name.equals("equivalence")) {
value = new ConceptMapEquivalenceEnumFactory().fromType(castToCode(value));
this.equivalence = (Enumeration) value; // Enumeration<ConceptMapEquivalence>
} else if (name.equals("relationship")) {
value = new ConceptMapRelationshipEnumFactory().fromType(castToCode(value));
this.relationship = (Enumeration) value; // Enumeration<ConceptMapRelationship>
} else if (name.equals("comment")) {
this.comment = castToString(value); // StringType
} else if (name.equals("dependsOn")) {
@ -1470,7 +1522,7 @@ public class ConceptMap extends MetadataResource {
switch (hash) {
case 3059181: return getCodeElement();
case 1671764162: return getDisplayElement();
case -15828692: return getEquivalenceElement();
case -261851592: return getRelationshipElement();
case 950398559: return getCommentElement();
case -1109214266: return addDependsOn();
case -309474065: return addProduct();
@ -1484,7 +1536,7 @@ public class ConceptMap extends MetadataResource {
switch (hash) {
case 3059181: /*code*/ return new String[] {"code"};
case 1671764162: /*display*/ return new String[] {"string"};
case -15828692: /*equivalence*/ return new String[] {"code"};
case -261851592: /*relationship*/ return new String[] {"code"};
case 950398559: /*comment*/ return new String[] {"string"};
case -1109214266: /*dependsOn*/ return new String[] {};
case -309474065: /*product*/ return new String[] {"@ConceptMap.group.element.target.dependsOn"};
@ -1501,8 +1553,8 @@ public class ConceptMap extends MetadataResource {
else if (name.equals("display")) {
throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.display");
}
else if (name.equals("equivalence")) {
throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.equivalence");
else if (name.equals("relationship")) {
throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.relationship");
}
else if (name.equals("comment")) {
throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.comment");
@ -1522,7 +1574,7 @@ public class ConceptMap extends MetadataResource {
copyValues(dst);
dst.code = code == null ? null : code.copy();
dst.display = display == null ? null : display.copy();
dst.equivalence = equivalence == null ? null : equivalence.copy();
dst.relationship = relationship == null ? null : relationship.copy();
dst.comment = comment == null ? null : comment.copy();
if (dependsOn != null) {
dst.dependsOn = new ArrayList<OtherElementComponent>();
@ -1544,7 +1596,7 @@ public class ConceptMap extends MetadataResource {
if (!(other_ instanceof TargetElementComponent))
return false;
TargetElementComponent o = (TargetElementComponent) other_;
return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(equivalence, o.equivalence, true)
return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(relationship, o.relationship, true)
&& compareDeep(comment, o.comment, true) && compareDeep(dependsOn, o.dependsOn, true) && compareDeep(product, o.product, true)
;
}
@ -1556,12 +1608,12 @@ public class ConceptMap extends MetadataResource {
if (!(other_ instanceof TargetElementComponent))
return false;
TargetElementComponent o = (TargetElementComponent) other_;
return compareValues(code, o.code, true) && compareValues(display, o.display, true) && compareValues(equivalence, o.equivalence, true)
return compareValues(code, o.code, true) && compareValues(display, o.display, true) && compareValues(relationship, o.relationship, true)
&& compareValues(comment, o.comment, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, equivalence
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, relationship
, comment, dependsOn, product);
}

View File

@ -29,7 +29,7 @@ public class Enumerations {
// AdministrativeGender: The gender of a person used for administrative purposes.
// AgeUnits: A valueSet of UCUM codes for representing age value units.
// BindingStrength: Indication of the degree of conformance expectations associated with a binding.
// ConceptMapEquivalence: The degree of equivalence between concepts.
// ConceptMapRelationship: The relationship between concepts.
// DataAbsentReason: Used to specify why the normally expected content of the data element is missing.
// DataType: A version specific list of the data types defined by the FHIR specification for use as an element type (any of the FHIR defined data types).
// DefinitionResourceType: A list of all the definition resource types defined in this version of the FHIR specification.
@ -533,9 +533,9 @@ public class Enumerations {
}
}
public enum ConceptMapEquivalence {
public enum ConceptMapRelationship {
/**
* The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.
* The concepts are related to each other, but the exact relationship is not known.
*/
RELATEDTO,
/**
@ -543,108 +543,63 @@ public class Enumerations {
*/
EQUIVALENT,
/**
* The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).
* The target mapping is broader in meaning than the source concept.
*/
EQUAL,
/**
* The target mapping is wider in meaning than the source concept.
*/
WIDER,
/**
* The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
*/
SUBSUMES,
BROADER,
/**
* The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
*/
NARROWER,
/**
* The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
* This is an explicit assertion that there is no relationship between the source and target concept.
*/
SPECIALIZES,
/**
* The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
*/
INEXACT,
/**
* There is no match for this concept in the target code system.
*/
UNMATCHED,
/**
* This is an explicit assertion that there is no mapping between the source and target concept.
*/
DISJOINT,
NOTRELATEDTO,
/**
* added to help the parsers
*/
NULL;
public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
public static ConceptMapRelationship fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("relatedto".equals(codeString))
if ("related-to".equals(codeString))
return RELATEDTO;
if ("equivalent".equals(codeString))
return EQUIVALENT;
if ("equal".equals(codeString))
return EQUAL;
if ("wider".equals(codeString))
return WIDER;
if ("subsumes".equals(codeString))
return SUBSUMES;
if ("broader".equals(codeString))
return BROADER;
if ("narrower".equals(codeString))
return NARROWER;
if ("specializes".equals(codeString))
return SPECIALIZES;
if ("inexact".equals(codeString))
return INEXACT;
if ("unmatched".equals(codeString))
return UNMATCHED;
if ("disjoint".equals(codeString))
return DISJOINT;
throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
if ("not-related-to".equals(codeString))
return NOTRELATEDTO;
throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case RELATEDTO: return "relatedto";
case RELATEDTO: return "related-to";
case EQUIVALENT: return "equivalent";
case EQUAL: return "equal";
case WIDER: return "wider";
case SUBSUMES: return "subsumes";
case BROADER: return "broader";
case NARROWER: return "narrower";
case SPECIALIZES: return "specializes";
case INEXACT: return "inexact";
case UNMATCHED: return "unmatched";
case DISJOINT: return "disjoint";
case NOTRELATEDTO: return "not-related-to";
default: return "?";
}
}
public String getSystem() {
switch (this) {
case RELATEDTO: return "http://hl7.org/fhir/concept-map-equivalence";
case EQUIVALENT: return "http://hl7.org/fhir/concept-map-equivalence";
case EQUAL: return "http://hl7.org/fhir/concept-map-equivalence";
case WIDER: return "http://hl7.org/fhir/concept-map-equivalence";
case SUBSUMES: return "http://hl7.org/fhir/concept-map-equivalence";
case NARROWER: return "http://hl7.org/fhir/concept-map-equivalence";
case SPECIALIZES: return "http://hl7.org/fhir/concept-map-equivalence";
case INEXACT: return "http://hl7.org/fhir/concept-map-equivalence";
case UNMATCHED: return "http://hl7.org/fhir/concept-map-equivalence";
case DISJOINT: return "http://hl7.org/fhir/concept-map-equivalence";
case RELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
case EQUIVALENT: return "http://hl7.org/fhir/concept-map-relationship";
case BROADER: return "http://hl7.org/fhir/concept-map-relationship";
case NARROWER: return "http://hl7.org/fhir/concept-map-relationship";
case NOTRELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.";
case RELATEDTO: return "The concepts are related to each other, but the exact relationship is not known.";
case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).";
case WIDER: return "The target mapping is wider in meaning than the source concept.";
case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
case BROADER: return "The target mapping is wider in meaning than the source concept.";
case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
case UNMATCHED: return "There is no match for this concept in the target code system.";
case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
case NOTRELATEDTO: return "This is an explicit assertion that there is no relationship between the source and target concept.";
default: return "?";
}
}
@ -652,100 +607,65 @@ public class Enumerations {
switch (this) {
case RELATEDTO: return "Related To";
case EQUIVALENT: return "Equivalent";
case EQUAL: return "Equal";
case WIDER: return "Wider";
case SUBSUMES: return "Subsumes";
case BROADER: return "Broader";
case NARROWER: return "Narrower";
case SPECIALIZES: return "Specializes";
case INEXACT: return "Inexact";
case UNMATCHED: return "Unmatched";
case DISJOINT: return "Disjoint";
case NOTRELATEDTO: return "Not Related To";
default: return "?";
}
}
}
public static class ConceptMapEquivalenceEnumFactory implements EnumFactory<ConceptMapEquivalence> {
public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException {
public static class ConceptMapRelationshipEnumFactory implements EnumFactory<ConceptMapRelationship> {
public ConceptMapRelationship fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("relatedto".equals(codeString))
return ConceptMapEquivalence.RELATEDTO;
if ("related-to".equals(codeString))
return ConceptMapRelationship.RELATEDTO;
if ("equivalent".equals(codeString))
return ConceptMapEquivalence.EQUIVALENT;
if ("equal".equals(codeString))
return ConceptMapEquivalence.EQUAL;
if ("wider".equals(codeString))
return ConceptMapEquivalence.WIDER;
if ("subsumes".equals(codeString))
return ConceptMapEquivalence.SUBSUMES;
return ConceptMapRelationship.EQUIVALENT;
if ("broader".equals(codeString))
return ConceptMapRelationship.BROADER;
if ("narrower".equals(codeString))
return ConceptMapEquivalence.NARROWER;
if ("specializes".equals(codeString))
return ConceptMapEquivalence.SPECIALIZES;
if ("inexact".equals(codeString))
return ConceptMapEquivalence.INEXACT;
if ("unmatched".equals(codeString))
return ConceptMapEquivalence.UNMATCHED;
if ("disjoint".equals(codeString))
return ConceptMapEquivalence.DISJOINT;
throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
return ConceptMapRelationship.NARROWER;
if ("not-related-to".equals(codeString))
return ConceptMapRelationship.NOTRELATEDTO;
throw new IllegalArgumentException("Unknown ConceptMapRelationship code '"+codeString+"'");
}
public Enumeration<ConceptMapEquivalence> fromType(Base code) throws FHIRException {
public Enumeration<ConceptMapRelationship> fromType(Base code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration<ConceptMapEquivalence>(this);
return new Enumeration<ConceptMapRelationship>(this);
String codeString = ((PrimitiveType) code).asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("relatedto".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.RELATEDTO);
if ("related-to".equals(codeString))
return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.RELATEDTO);
if ("equivalent".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUIVALENT);
if ("equal".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUAL);
if ("wider".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.WIDER);
if ("subsumes".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SUBSUMES);
return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.EQUIVALENT);
if ("broader".equals(codeString))
return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.BROADER);
if ("narrower".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.NARROWER);
if ("specializes".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SPECIALIZES);
if ("inexact".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.INEXACT);
if ("unmatched".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.UNMATCHED);
if ("disjoint".equals(codeString))
return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.DISJOINT);
throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.NARROWER);
if ("not-related-to".equals(codeString))
return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.NOTRELATEDTO);
throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
}
public String toCode(ConceptMapEquivalence code) {
if (code == ConceptMapEquivalence.RELATEDTO)
return "relatedto";
if (code == ConceptMapEquivalence.EQUIVALENT)
public String toCode(ConceptMapRelationship code) {
if (code == ConceptMapRelationship.RELATEDTO)
return "related-to";
if (code == ConceptMapRelationship.EQUIVALENT)
return "equivalent";
if (code == ConceptMapEquivalence.EQUAL)
return "equal";
if (code == ConceptMapEquivalence.WIDER)
return "wider";
if (code == ConceptMapEquivalence.SUBSUMES)
return "subsumes";
if (code == ConceptMapEquivalence.NARROWER)
if (code == ConceptMapRelationship.BROADER)
return "broader";
if (code == ConceptMapRelationship.NARROWER)
return "narrower";
if (code == ConceptMapEquivalence.SPECIALIZES)
return "specializes";
if (code == ConceptMapEquivalence.INEXACT)
return "inexact";
if (code == ConceptMapEquivalence.UNMATCHED)
return "unmatched";
if (code == ConceptMapEquivalence.DISJOINT)
return "disjoint";
if (code == ConceptMapRelationship.NOTRELATEDTO)
return "not-related-to";
return "?";
}
public String toSystem(ConceptMapEquivalence code) {
public String toSystem(ConceptMapRelationship code) {
return code.getSystem();
}
}

View File

@ -55,10 +55,10 @@ package org.hl7.fhir.r5.model.codesystems;
import org.hl7.fhir.exceptions.FHIRException;
public enum ConceptMapEquivalence {
public enum ConceptMapRelationship {
/**
* The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.
* The concepts are related to each other, but the exact relationship is not known.
*/
RELATEDTO,
/**
@ -66,96 +66,56 @@ public enum ConceptMapEquivalence {
*/
EQUIVALENT,
/**
* The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).
* The target mapping is broader in meaning than the source concept.
*/
EQUAL,
/**
* The target mapping is wider in meaning than the source concept.
*/
WIDER,
/**
* The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
*/
SUBSUMES,
BROADER,
/**
* The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
*/
NARROWER,
/**
* The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
* This is an explicit assertion that there is no relationship between the source and target concept.
*/
SPECIALIZES,
/**
* The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
*/
INEXACT,
/**
* There is no match for this concept in the target code system.
*/
UNMATCHED,
/**
* This is an explicit assertion that there is no mapping between the source and target concept.
*/
DISJOINT,
NOTRELATEDTO,
/**
* added to help the parsers
*/
NULL;
public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
public static ConceptMapRelationship fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("relatedto".equals(codeString))
if ("related-to".equals(codeString))
return RELATEDTO;
if ("equivalent".equals(codeString))
return EQUIVALENT;
if ("equal".equals(codeString))
return EQUAL;
if ("wider".equals(codeString))
return WIDER;
if ("subsumes".equals(codeString))
return SUBSUMES;
if ("broader".equals(codeString))
return BROADER;
if ("narrower".equals(codeString))
return NARROWER;
if ("specializes".equals(codeString))
return SPECIALIZES;
if ("inexact".equals(codeString))
return INEXACT;
if ("unmatched".equals(codeString))
return UNMATCHED;
if ("disjoint".equals(codeString))
return DISJOINT;
throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
if ("not-related-to".equals(codeString))
return NOTRELATEDTO;
throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case RELATEDTO: return "relatedto";
case RELATEDTO: return "related-to";
case EQUIVALENT: return "equivalent";
case EQUAL: return "equal";
case WIDER: return "wider";
case SUBSUMES: return "subsumes";
case BROADER: return "broader";
case NARROWER: return "narrower";
case SPECIALIZES: return "specializes";
case INEXACT: return "inexact";
case UNMATCHED: return "unmatched";
case DISJOINT: return "disjoint";
case NOTRELATEDTO: return "not-related-to";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/concept-map-equivalence";
return "http://hl7.org/fhir/concept-map-relationship";
}
public String getDefinition() {
switch (this) {
case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.";
case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).";
case WIDER: return "The target mapping is wider in meaning than the source concept.";
case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
case BROADER: return "The target mapping is broader in meaning than the source concept.";
case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
case UNMATCHED: return "There is no match for this concept in the target code system.";
case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
case NOTRELATEDTO: return "This is an explicit assertion that there is no relationship between the source and target concept.";
default: return "?";
}
}
@ -163,14 +123,9 @@ public enum ConceptMapEquivalence {
switch (this) {
case RELATEDTO: return "Related To";
case EQUIVALENT: return "Equivalent";
case EQUAL: return "Equal";
case WIDER: return "Wider";
case SUBSUMES: return "Subsumes";
case BROADER: return "Broader";
case NARROWER: return "Narrower";
case SPECIALIZES: return "Specializes";
case INEXACT: return "Inexact";
case UNMATCHED: return "Unmatched";
case DISJOINT: return "Disjoint";
case NOTRELATEDTO: return "Not Related To";
default: return "?";
}
}

View File

@ -55,59 +55,39 @@ package org.hl7.fhir.r5.model.codesystems;
import org.hl7.fhir.r5.model.EnumFactory;
public class ConceptMapEquivalenceEnumFactory implements EnumFactory<ConceptMapEquivalence> {
public class ConceptMapRelationshipEnumFactory implements EnumFactory<ConceptMapRelationship> {
public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException {
public ConceptMapRelationship fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("relatedto".equals(codeString))
return ConceptMapEquivalence.RELATEDTO;
if ("related-to".equals(codeString))
return ConceptMapRelationship.RELATEDTO;
if ("equivalent".equals(codeString))
return ConceptMapEquivalence.EQUIVALENT;
if ("equal".equals(codeString))
return ConceptMapEquivalence.EQUAL;
if ("wider".equals(codeString))
return ConceptMapEquivalence.WIDER;
if ("subsumes".equals(codeString))
return ConceptMapEquivalence.SUBSUMES;
return ConceptMapRelationship.EQUIVALENT;
if ("broader".equals(codeString))
return ConceptMapRelationship.BROADER;
if ("narrower".equals(codeString))
return ConceptMapEquivalence.NARROWER;
if ("specializes".equals(codeString))
return ConceptMapEquivalence.SPECIALIZES;
if ("inexact".equals(codeString))
return ConceptMapEquivalence.INEXACT;
if ("unmatched".equals(codeString))
return ConceptMapEquivalence.UNMATCHED;
if ("disjoint".equals(codeString))
return ConceptMapEquivalence.DISJOINT;
throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
return ConceptMapRelationship.NARROWER;
if ("not-related-to".equals(codeString))
return ConceptMapRelationship.NOTRELATEDTO;
throw new IllegalArgumentException("Unknown ConceptMapRelationship code '"+codeString+"'");
}
public String toCode(ConceptMapEquivalence code) {
if (code == ConceptMapEquivalence.RELATEDTO)
return "relatedto";
if (code == ConceptMapEquivalence.EQUIVALENT)
public String toCode(ConceptMapRelationship code) {
if (code == ConceptMapRelationship.RELATEDTO)
return "related-to";
if (code == ConceptMapRelationship.EQUIVALENT)
return "equivalent";
if (code == ConceptMapEquivalence.EQUAL)
return "equal";
if (code == ConceptMapEquivalence.WIDER)
return "wider";
if (code == ConceptMapEquivalence.SUBSUMES)
return "subsumes";
if (code == ConceptMapEquivalence.NARROWER)
if (code == ConceptMapRelationship.BROADER)
return "broader";
if (code == ConceptMapRelationship.NARROWER)
return "narrower";
if (code == ConceptMapEquivalence.SPECIALIZES)
return "specializes";
if (code == ConceptMapEquivalence.INEXACT)
return "inexact";
if (code == ConceptMapEquivalence.UNMATCHED)
return "unmatched";
if (code == ConceptMapEquivalence.DISJOINT)
return "disjoint";
if (code == ConceptMapRelationship.NOTRELATEDTO)
return "not-related-to";
return "?";
}
public String toSystem(ConceptMapEquivalence code) {
public String toSystem(ConceptMapRelationship code) {
return code.getSystem();
}

View File

@ -28,7 +28,7 @@ import org.hl7.fhir.r5.model.ConceptMap;
import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent;
import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent;
import org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
public class ConceptMapEngine {
@ -65,7 +65,7 @@ public class ConceptMapEngine {
return null;
TargetElementComponent tt = null;
for (TargetElementComponent t : ct.getTarget()) {
if (!t.hasDependsOn() && !t.hasProduct() && isOkEquivalence(t.getEquivalence())) {
if (!t.hasDependsOn() && !t.hasProduct() && isOkRelationship(t.getRelationship())) {
if (tt != null)
throw new FHIRException("Unable to process translate "+code+" because multiple targets were found in concept map "+cm.getUrl());
tt = t;
@ -76,8 +76,8 @@ public class ConceptMapEngine {
return new Coding().setSystem(cg.getTarget()).setVersion(cg.getTargetVersion()).setCode(tt.getCode()).setDisplay(tt.getDisplay());
}
private boolean isOkEquivalence(ConceptMapEquivalence equivalence) {
return equivalence != null && equivalence != ConceptMapEquivalence.DISJOINT && equivalence != ConceptMapEquivalence.UNMATCHED;
private boolean isOkRelationship(ConceptMapRelationship relationship) {
return relationship != null && relationship != ConceptMapRelationship.NOTRELATEDTO;
}
private Coding translateBySystem(ConceptMap cm, String system, String code) {

View File

@ -40,7 +40,7 @@ import org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent;
import org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent;
import org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent;
import org.hl7.fhir.r5.model.DateTimeType;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r5.model.IdType;
import org.hl7.fhir.r5.model.MetadataResource;
@ -212,9 +212,9 @@ public class MappingSheetParser {
element.addExtension(ToolingExtensions.EXT_MAPPING_TYPE, new StringType(row.getDataType()));
element.addExtension(ToolingExtensions.EXT_MAPPING_CARD, new StringType(row.getCardinality()));
if ("N/A".equals(row.getAttribute()))
element.getTargetFirstRep().setEquivalence(ConceptMapEquivalence.UNMATCHED);
element.setNoMap(true);
else {
element.getTargetFirstRep().setEquivalence(ConceptMapEquivalence.RELATEDTO);
element.getTargetFirstRep().setRelationship(ConceptMapRelationship.RELATEDTO);
if (row.getCondition() != null)
element.getTargetFirstRep().addDependsOn().setProperty("http://hl7.org/fhirpath").setValue(processCondition(row.getCondition()));
element.getTargetFirstRep().setCode(row.getAttribute());
@ -404,7 +404,7 @@ public class MappingSheetParser {
row.name = e.getExtensionString(ToolingExtensions.EXT_MAPPING_NAME);
row.dataType = e.getExtensionString(ToolingExtensions.EXT_MAPPING_TYPE);
row.cardinality = e.getExtensionString(ToolingExtensions.EXT_MAPPING_CARD);
if (t.getEquivalence() == ConceptMapEquivalence.UNMATCHED) {
if (e.getNoMap().booleanValue() == true) {
row.attribute = "N/A";
} else {
OtherElementComponent dep = getDependency(t, "http://hl7.org/fhirpath");

View File

@ -125,7 +125,7 @@ import org.hl7.fhir.r5.model.DomainResource;
import org.hl7.fhir.r5.model.Dosage;
import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
import org.hl7.fhir.r5.model.Extension;
import org.hl7.fhir.r5.model.ExtensionHelper;
import org.hl7.fhir.r5.model.HumanName;
@ -2284,7 +2284,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
addMarkdown(x, cm.getDescription());
x.br();
CodeSystem cs = context.fetchCodeSystem("http://hl7.org/fhir/concept-map-equivalence");
CodeSystem cs = context.fetchCodeSystem("http://hl7.org/fhir/concept-map-relationship");
String eqpath = cs.getUserString("path");
for (ConceptMapGroupComponent grp : cm.getGroup()) {
@ -2323,7 +2323,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
XhtmlNode tbl = x.table( "grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Source Code");
tr.td().b().tx("Equivalence");
tr.td().b().tx("Relationship");
tr.td().b().tx("Destination Code");
if (comment)
tr.td().b().tx("Comment");
@ -2335,7 +2335,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
if (display != null && !isSameCodeAndDisplay(ccl.getCode(), display))
td.tx(" ("+display+")");
TargetElementComponent ccm = ccl.getTarget().get(0);
tr.td().addText(!ccm.hasEquivalence() ? "" : ccm.getEquivalence().toCode());
tr.td().addText(!ccm.hasRelationship() ? "" : ccm.getRelationship().toCode());
td = tr.td();
td.addText(ccm.getCode());
display = getDisplayForConcept(grp.getTarget(), ccm.getCode());
@ -2349,7 +2349,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
XhtmlNode tr = tbl.tr();
XhtmlNode td;
tr.td().colspan(Integer.toString(sources.size())).b().tx("Source Concept Details");
tr.td().b().tx("Equivalence");
tr.td().b().tx("Relationship");
tr.td().colspan(Integer.toString(targets.size())).b().tx("Destination Concept Details");
if (comment)
tr.td().b().tx("Comment");
@ -2422,10 +2422,10 @@ public class NarrativeGenerator implements INarrativeGenerator {
}
}
first = false;
if (!ccm.hasEquivalence())
tr.td().tx(":"+"("+ConceptMapEquivalence.EQUIVALENT.toCode()+")");
if (!ccm.hasRelationship())
tr.td().tx(":"+"("+ConceptMapRelationship.EQUIVALENT.toCode()+")");
else
tr.td().ah(eqpath+"#"+ccm.getEquivalence().toCode()).tx(ccm.getEquivalence().toCode());
tr.td().ah(eqpath+"#"+ccm.getRelationship().toCode()).tx(ccm.getRelationship().toCode());
td = tr.td();
if (targets.get("code").size() == 1)
td.addText(ccm.getCode());
@ -3296,8 +3296,8 @@ public class NarrativeGenerator implements INarrativeGenerator {
if (!first)
td.br();
first = false;
XhtmlNode span = td.span(null, mapping.comp.getEquivalence().toString());
span.addText(getCharForEquivalence(mapping.comp));
XhtmlNode span = td.span(null, mapping.comp.getRelationship().toString());
span.addText(getCharForRelationship(mapping.comp));
addRefToCode(td, mapping.group.getTarget(), m.getLink(), mapping.comp.getCode());
if (!Utilities.noString(mapping.comp.getComment()))
td.i().tx("("+mapping.comp.getComment()+")");
@ -3515,8 +3515,8 @@ public class NarrativeGenerator implements INarrativeGenerator {
if (!first)
td.br();
first = false;
XhtmlNode span = td.span(null, mapping.comp.hasEquivalence() ? mapping.comp.getEquivalence().toCode() : "");
span.addText(getCharForEquivalence(mapping.comp));
XhtmlNode span = td.span(null, mapping.comp.hasRelationship() ? mapping.comp.getRelationship().toCode() : "");
span.addText(getCharForRelationship(mapping.comp));
a = td.ah(prefix+m.getLink()+"#"+makeAnchor(mapping.group.getTarget(), mapping.comp.getCode()));
a.addText(mapping.comp.getCode());
if (!Utilities.noString(mapping.comp.getComment()))
@ -3564,17 +3564,14 @@ public class NarrativeGenerator implements INarrativeGenerator {
return null;
}
private String getCharForEquivalence(TargetElementComponent mapping) {
if (!mapping.hasEquivalence())
private String getCharForRelationship(TargetElementComponent mapping) {
if (!mapping.hasRelationship())
return "";
switch (mapping.getEquivalence()) {
case EQUAL : return "=";
switch (mapping.getRelationship()) {
case EQUIVALENT : return "~";
case WIDER : return "<";
case BROADER : return "<";
case NARROWER : return ">";
case INEXACT : return "><";
case UNMATCHED : return "-";
case DISJOINT : return "!=";
case NOTRELATEDTO : return "!=";
default: return "?";
}
}

View File

@ -64,7 +64,7 @@ import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionMappingComponent;
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.Enumeration;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapEquivalence;
import org.hl7.fhir.r5.model.Enumerations.ConceptMapRelationship;
import org.hl7.fhir.r5.model.Enumerations.FHIRVersion;
import org.hl7.fhir.r5.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r5.model.ExpressionNode;
@ -329,7 +329,7 @@ public class StructureMapUtilities {
b.append("\"");
}
b.append(" ");
b.append(getChar(ce.getTargetFirstRep().getEquivalence()));
b.append(getChar(ce.getTargetFirstRep().getRelationship()));
b.append(" ");
b.append(prefixesTgt.get(cg.getTarget()));
b.append(":");
@ -346,18 +346,13 @@ public class StructureMapUtilities {
b.append("}\r\n\r\n");
}
private static Object getChar(ConceptMapEquivalence equivalence) {
switch (equivalence) {
private static Object getChar(ConceptMapRelationship relationship) {
switch (relationship) {
case RELATEDTO: return "-";
case EQUAL: return "=";
case EQUIVALENT: return "==";
case DISJOINT: return "!=";
case UNMATCHED: return "--";
case WIDER: return "<=";
case SUBSUMES: return "<-";
case NOTRELATEDTO: return "!=";
case BROADER: return "<=";
case NARROWER: return ">=";
case SPECIALIZES: return ">-";
case INEXACT: return "~";
default: return "??";
}
}
@ -770,22 +765,20 @@ public class StructureMapUtilities {
String srcs = readPrefix(prefixes, lexer);
lexer.token(":");
String sc = lexer.getCurrent().startsWith("\"") ? lexer.readConstant("code") : lexer.take();
ConceptMapEquivalence eq = readEquivalence(lexer);
String tgts = (eq != ConceptMapEquivalence.UNMATCHED) ? readPrefix(prefixes, lexer) : "";
ConceptMapRelationship rel = readRelationship(lexer);
String tgts = readPrefix(prefixes, lexer);
ConceptMapGroupComponent g = getGroup(map, srcs, tgts);
SourceElementComponent e = g.addElement();
e.setCode(sc);
if (e.getCode().startsWith("\""))
e.setCode(lexer.processConstant(e.getCode()));
TargetElementComponent tgt = e.addTarget();
if (eq != ConceptMapEquivalence.EQUIVALENT)
tgt.setEquivalence(eq);
if (tgt.getEquivalence() != ConceptMapEquivalence.UNMATCHED) {
lexer.token(":");
tgt.setCode(lexer.take());
if (tgt.getCode().startsWith("\""))
tgt.setCode(lexer.processConstant(tgt.getCode()));
}
if (rel != ConceptMapRelationship.EQUIVALENT)
tgt.setRelationship(rel);
lexer.token(":");
tgt.setCode(lexer.take());
if (tgt.getCode().startsWith("\""))
tgt.setCode(lexer.processConstant(tgt.getCode()));
if (lexer.hasComment())
tgt.setComment(lexer.take().substring(2).trim());
}
@ -817,29 +810,19 @@ public class StructureMapUtilities {
}
private ConceptMapEquivalence readEquivalence(FHIRLexer lexer) throws FHIRLexerException {
private ConceptMapRelationship readRelationship(FHIRLexer lexer) throws FHIRLexerException {
String token = lexer.take();
if (token.equals("-"))
return ConceptMapEquivalence.RELATEDTO;
if (token.equals("="))
return ConceptMapEquivalence.EQUAL;
return ConceptMapRelationship.RELATEDTO;
if (token.equals("=="))
return ConceptMapEquivalence.EQUIVALENT;
return ConceptMapRelationship.EQUIVALENT;
if (token.equals("!="))
return ConceptMapEquivalence.DISJOINT;
if (token.equals("--"))
return ConceptMapEquivalence.UNMATCHED;
return ConceptMapRelationship.NOTRELATEDTO;
if (token.equals("<="))
return ConceptMapEquivalence.WIDER;
if (token.equals("<-"))
return ConceptMapEquivalence.SUBSUMES;
return ConceptMapRelationship.BROADER;
if (token.equals(">="))
return ConceptMapEquivalence.NARROWER;
if (token.equals(">-"))
return ConceptMapEquivalence.SPECIALIZES;
if (token.equals("~"))
return ConceptMapEquivalence.INEXACT;
throw lexer.error("Unknown equivalence token '"+token+"'");
return ConceptMapRelationship.NARROWER;
throw lexer.error("Unknown relationship token '"+token+"'");
}
@ -2131,7 +2114,7 @@ public class StructureMapUtilities {
message = "Concept map "+su+" found no translation for "+src.getCode();
else {
for (TargetElementComponent tgt : list.get(0).comp.getTarget()) {
if (tgt.getEquivalence() == null || EnumSet.of( ConceptMapEquivalence.EQUAL , ConceptMapEquivalence.RELATEDTO , ConceptMapEquivalence.EQUIVALENT, ConceptMapEquivalence.WIDER).contains(tgt.getEquivalence())) {
if (tgt.getRelationship() == null || EnumSet.of( ConceptMapRelationship.RELATEDTO , ConceptMapRelationship.EQUIVALENT, ConceptMapRelationship.BROADER).contains(tgt.getRelationship())) {
if (done) {
message = "Concept map "+su+" found multiple matches for "+src.getCode();
done = false;
@ -2139,8 +2122,6 @@ public class StructureMapUtilities {
done = true;
outcome = new Coding().setCode(tgt.getCode()).setSystem(list.get(0).group.getTarget());
}
} else if (tgt.getEquivalence() == ConceptMapEquivalence.UNMATCHED) {
done = true;
}
}
if (!done)