mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-02 01:19:14 +00:00
fixes to snapshot generation
This commit is contained in:
parent
47429311cf
commit
0ba9061e0b
@ -1295,7 +1295,8 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||||||
if (usage.hasBinding())
|
if (usage.hasBinding())
|
||||||
res.setBinding(usage.getBinding().copy());
|
res.setBinding(usage.getBinding().copy());
|
||||||
for (ElementDefinitionConstraintComponent c : usage.getConstraint())
|
for (ElementDefinitionConstraintComponent c : usage.getConstraint())
|
||||||
res.addConstraint(c);
|
if (!res.hasConstraint(c.getKey()))
|
||||||
|
res.addConstraint(c);
|
||||||
for (Extension e : usage.getExtension()) {
|
for (Extension e : usage.getExtension()) {
|
||||||
if (!res.hasExtension(e.getUrl()))
|
if (!res.hasExtension(e.getUrl()))
|
||||||
res.addExtension(e.copy());
|
res.addExtension(e.copy());
|
||||||
@ -1971,13 +1972,16 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||||||
s.setSource(base.getId());
|
s.setSource(base.getId());
|
||||||
}
|
}
|
||||||
if (derived.hasConstraint()) {
|
if (derived.hasConstraint()) {
|
||||||
for (ElementDefinitionConstraintComponent s : derived.getConstraint()) {
|
for (ElementDefinitionConstraintComponent s : derived.getConstraint()) {
|
||||||
ElementDefinitionConstraintComponent inv = s.copy();
|
if (!base.hasConstraint(s.getKey())) {
|
||||||
base.getConstraint().add(inv);
|
ElementDefinitionConstraintComponent inv = s.copy();
|
||||||
|
base.getConstraint().add(inv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (IdType id : derived.getCondition()) {
|
for (IdType id : derived.getCondition()) {
|
||||||
base.getCondition().add(id);
|
if (!base.hasCondition(id))
|
||||||
|
base.getCondition().add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now, check that we still have a bindable type; if not, delete the binding - see task 8477
|
// now, check that we still have a bindable type; if not, delete the binding - see task 8477
|
||||||
|
@ -7576,6 +7576,22 @@ When pattern[x] is used to constrain a complex object, it means that each proper
|
|||||||
|
|
||||||
public String present() {
|
public String present() {
|
||||||
return hasId() ? getId() : getPath();
|
return hasId() ? getId() : getPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasCondition(IdType id) {
|
||||||
|
for (IdType c : getCondition()) {
|
||||||
|
if (c.primitiveValue().equals(id.primitiveValue()))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasConstraint(String key) {
|
||||||
|
for (ElementDefinitionConstraintComponent c : getConstraint()) {
|
||||||
|
if (c.getKey().equals(key))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,8 +36,13 @@
|
|||||||
<a name="Patient.extension"> </a>
|
<a name="Patient.extension"> </a>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/>
|
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/>
|
||||||
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">..3</td>
|
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||||
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/>
|
<span style="opacity: 0.4">0</span>..
|
||||||
|
<span style="opacity: 0.4">3</span>
|
||||||
|
</td>
|
||||||
|
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||||
|
<a style="opacity: 0.4" href="nulldatatypes.html#Extension">Extension</a>
|
||||||
|
</td>
|
||||||
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||||
<span style="font-weight:bold">Slice: </span>Unordered, Open by value:url
|
<span style="font-weight:bold">Slice: </span>Unordered, Open by value:url
|
||||||
</td>
|
</td>
|
||||||
@ -362,8 +367,8 @@
|
|||||||
<element id="Patient.extension:name2">
|
<element id="Patient.extension:name2">
|
||||||
<path value="Patient.extension"/>
|
<path value="Patient.extension"/>
|
||||||
<sliceName value="name2"/>
|
<sliceName value="name2"/>
|
||||||
<short value="Mother's Maiden name"/>
|
<short value="Condition(s) limiting movement, senses, or activities"/>
|
||||||
<definition value="Mother's maiden (unmarried) name, commonly collected to help verify patient identity."/>
|
<definition value="Value(s) identifying physical or mental condition(s) that limits a person's movements, senses, or activities."/>
|
||||||
<min value="0"/>
|
<min value="0"/>
|
||||||
<max value="*"/>
|
<max value="*"/>
|
||||||
<base>
|
<base>
|
||||||
@ -373,7 +378,7 @@
|
|||||||
</base>
|
</base>
|
||||||
<type>
|
<type>
|
||||||
<code value="Extension"/>
|
<code value="Extension"/>
|
||||||
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
|
<profile value="http://hl7.org/fhir/StructureDefinition/patient-disability"/>
|
||||||
</type>
|
</type>
|
||||||
<condition value="ele-1"/>
|
<condition value="ele-1"/>
|
||||||
<constraint>
|
<constraint>
|
||||||
@ -393,14 +398,6 @@
|
|||||||
<source value="Extension"/>
|
<source value="Extension"/>
|
||||||
</constraint>
|
</constraint>
|
||||||
<isModifier value="false"/>
|
<isModifier value="false"/>
|
||||||
<mapping>
|
|
||||||
<identity value="v2"/>
|
|
||||||
<map value="PID-6"/>
|
|
||||||
</mapping>
|
|
||||||
<mapping>
|
|
||||||
<identity value="rim"/>
|
|
||||||
<map value="Role relationship to entity with maiden name (?)"/>
|
|
||||||
</mapping>
|
|
||||||
</element>
|
</element>
|
||||||
<element id="Patient.modifierExtension">
|
<element id="Patient.modifierExtension">
|
||||||
<path value="Patient.modifierExtension"/>
|
<path value="Patient.modifierExtension"/>
|
||||||
@ -1602,7 +1599,7 @@
|
|||||||
<sliceName value="name2"/>
|
<sliceName value="name2"/>
|
||||||
<type>
|
<type>
|
||||||
<code value="Extension"/>
|
<code value="Extension"/>
|
||||||
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
|
<profile value="http://hl7.org/fhir/StructureDefinition/patient-disability"/>
|
||||||
</type>
|
</type>
|
||||||
</element>
|
</element>
|
||||||
</differential>
|
</differential>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<sliceName value="name2"/>
|
<sliceName value="name2"/>
|
||||||
<type>
|
<type>
|
||||||
<code value="Extension"/>
|
<code value="Extension"/>
|
||||||
<profile value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
|
<profile value="http://hl7.org/fhir/StructureDefinition/patient-disability"/>
|
||||||
</type>
|
</type>
|
||||||
</element>
|
</element>
|
||||||
</differential>
|
</differential>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<StructureDefinition xmlns="http://hl7.org/fhir">
|
<StructureDefinition xmlns="http://hl7.org/fhir">
|
||||||
<id value="t4"/>
|
<id value="t4a"/>
|
||||||
<text>
|
<text>
|
||||||
<status value="generated"/>
|
<status value="generated"/>
|
||||||
<div xmlns="http://www.w3.org/1999/xhtml">
|
<div xmlns="http://www.w3.org/1999/xhtml">
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</text>
|
</text>
|
||||||
<url value="urn:uuid:71e0a5a6-95bf-4e04-aa6a-4af0ebef3f29"/>
|
<url value="urn:uuid:71e0a5a6-95bf-4e04-aa6a-4af0ebef3f29"/>
|
||||||
<name value="t4"/>
|
<name value="t4a"/>
|
||||||
<status value="draft"/>
|
<status value="draft"/>
|
||||||
<description value="fixture for #4: test appending documentation"/>
|
<description value="fixture for #4: test appending documentation"/>
|
||||||
<mapping>
|
<mapping>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<StructureDefinition xmlns="http://hl7.org/fhir">
|
<StructureDefinition xmlns="http://hl7.org/fhir">
|
||||||
<id value="t4"/>
|
<id value="t4a"/>
|
||||||
<url value="urn:uuid:71e0a5a6-95bf-4e04-aa6a-4af0ebef3f29"/>
|
<url value="urn:uuid:71e0a5a6-95bf-4e04-aa6a-4af0ebef3f29"/>
|
||||||
<name value="t4"/>
|
<name value="t4a"/>
|
||||||
<status value="draft"/>
|
<status value="draft"/>
|
||||||
<description value="fixture for #4: test appending documentation"/>
|
<description value="fixture for #4: test appending documentation"/>
|
||||||
<kind value="resource"/>
|
<kind value="resource"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user