Merge branch 'master' of https://github.com/hapifhir/org.hl7.fhir.core
This commit is contained in:
commit
ffded29218
|
@ -429,7 +429,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
throw new DefinitionException("Base profile "+base.getUrl()+" has no type");
|
||||
if (!derived.hasType())
|
||||
throw new DefinitionException("Derived profile "+derived.getUrl()+" has no type");
|
||||
if (!base.getType().equals(derived.getType()))
|
||||
if (!base.getType().equals(derived.getType()) && derived.getDerivation().equals(TypeDerivationRule.CONSTRAINT))
|
||||
throw new DefinitionException("Base & Derived profiles have different types ("+base.getUrl()+" = "+base.getType()+" vs "+derived.getUrl()+" = "+derived.getType()+")");
|
||||
|
||||
if (snapshotStack.contains(derived.getUrl()))
|
||||
|
@ -461,9 +461,22 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
// we actually delegate the work to a subroutine so we can re-enter it with a different cursors
|
||||
StructureDefinitionDifferentialComponent diff = cloneDiff(derived.getDifferential()); // we make a copy here because we're sometimes going to hack the differential while processing it. Have to migrate user data back afterwards
|
||||
|
||||
processPaths("", derived.getSnapshot(), base.getSnapshot(), diff, baseCursor, diffCursor, base.getSnapshot().getElement().size()-1,
|
||||
StructureDefinitionSnapshotComponent baseSnapshot = base.getSnapshot();
|
||||
if (derived.getDerivation().equals(TypeDerivationRule.SPECIALIZATION)) {
|
||||
baseSnapshot = cloneSnapshot(baseSnapshot, base.getType(), derived.getType());
|
||||
}
|
||||
processPaths("", derived.getSnapshot(), baseSnapshot, diff, baseCursor, diffCursor, baseSnapshot.getElement().size()-1,
|
||||
derived.getDifferential().hasElement() ? derived.getDifferential().getElement().size()-1 : -1, url, webUrl, derived.present(), null, null, false, base.getUrl(), null, false, new ArrayList<ElementRedirection>(), base);
|
||||
if (derived.getDerivation().equals(TypeDerivationRule.SPECIALIZATION)) {
|
||||
for (ElementDefinition e : diff.getElement()) {
|
||||
if (!e.hasUserData(GENERATED_IN_SNAPSHOT)) {
|
||||
ElementDefinition outcome = updateURLs(url, webUrl, e.copy());
|
||||
e.setUserData(GENERATED_IN_SNAPSHOT, outcome);
|
||||
derived.getSnapshot().addElement(outcome);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty())
|
||||
throw new Error("type on first snapshot element for "+derived.getSnapshot().getElementFirstRep().getPath()+" in "+derived.getUrl()+" from "+base.getUrl());
|
||||
updateMaps(base, derived);
|
||||
|
@ -519,6 +532,16 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
return diff;
|
||||
}
|
||||
|
||||
private StructureDefinitionSnapshotComponent cloneSnapshot(StructureDefinitionSnapshotComponent source, String baseType, String derivedType) {
|
||||
StructureDefinitionSnapshotComponent diff = new StructureDefinitionSnapshotComponent();
|
||||
for (ElementDefinition sed : source.getElement()) {
|
||||
ElementDefinition ted = sed.copy();
|
||||
ted.setId(ted.getId().replaceFirst(baseType,derivedType));
|
||||
ted.setPath(ted.getPath().replaceFirst(baseType,derivedType));
|
||||
diff.getElement().add(ted);
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
|
||||
private String constraintSummary(ElementDefinition ed) {
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
|
|
|
@ -40,6 +40,7 @@ import javax.xml.transform.sax.SAXSource;
|
|||
import org.hl7.fhir.exceptions.DefinitionException;
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.conformance.ProfileUtilities;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.elementmodel.Element.SpecialElement;
|
||||
|
@ -244,8 +245,18 @@ public class XmlParser extends ParserBase {
|
|||
if (!Utilities.noString(text)) {
|
||||
Property property = getTextProp(properties);
|
||||
if (property != null) {
|
||||
context.getChildren().add(new Element(property.getName(), property, property.getType(), text).markLocation(line(node), col(node)));
|
||||
} else {
|
||||
if ("ED.data[x]".equals(property.getDefinition().getId())) {
|
||||
if ("B64".equals(node.getAttribute("representation"))) {
|
||||
context.getChildren().add(new Element("dataBase64Binary", property, "base64Binary", text).markLocation(line(node), col(node)));
|
||||
} else {
|
||||
context.getChildren().add(new Element("dataString", property, "string", text).markLocation(line(node), col(node)));
|
||||
}
|
||||
} else {
|
||||
context.getChildren().add(
|
||||
new Element(property.getName(), property, property.getType(), text).markLocation(line(node), col(node)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
logError(line(node), col(node), path, IssueType.STRUCTURE, "Text should not be present", IssueSeverity.ERROR);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.hl7.fhir.r5.test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -13,28 +16,119 @@ import org.hl7.fhir.r5.elementmodel.Element;
|
|||
import org.hl7.fhir.r5.elementmodel.Manager;
|
||||
import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat;
|
||||
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.r5.utils.FHIRPathEngine;
|
||||
import org.hl7.fhir.utilities.cache.PackageCacheManager;
|
||||
import org.hl7.fhir.utilities.cache.ToolsVersion;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CDARoundTripTests {
|
||||
|
||||
private SimpleWorkerContext context;
|
||||
private FHIRPathEngine fp;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
context = new SimpleWorkerContext();
|
||||
PackageCacheManager pcm = new PackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
|
||||
context.loadFromPackage(pcm.loadPackage("hl7.fhir.core"), null, "StructureDefinition");
|
||||
context.loadFromPackage(pcm.loadPackage("hl7.fhir.cda"), null, "StructureDefinition");
|
||||
context.loadFromPackage(pcm.loadPackage("hl7.fhir.core", "dev"), null, "StructureDefinition");
|
||||
context.loadFromPackage(pcm.loadPackage("hl7.fhir.cda", "dev"), null, "StructureDefinition");
|
||||
fp = new FHIRPathEngine(context);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCDA() throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
try {
|
||||
|
||||
String fileSource = TestingUtilities.resourceNameToFile("cda", "cda-original.xml");
|
||||
String roundTrip = TestingUtilities.resourceNameToFile("cda", "cda-roundtrip.xml");
|
||||
String jsonRoundTrip = TestingUtilities.resourceNameToFile("cda", "cda-roundtrip.json");
|
||||
|
||||
Element e = Manager.parse(context, new FileInputStream(fileSource), FhirFormat.XML);
|
||||
|
||||
Manager.compose(context, e, new FileOutputStream(roundTrip), FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e, new FileOutputStream(jsonRoundTrip), FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
|
||||
// <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
|
||||
// assertEquals("POCD_HD000040", fp.evaluateToString(e, "typeId.extension"));
|
||||
// assertEquals("2.16.840.1.113883.1.3", fp.evaluateToString(e, "typeId.root"));
|
||||
// <templateId root="2.16.840.1.113883.3.27.1776"/>
|
||||
// assertEquals("2.16.840.1.113883.3.27.1776", fp.evaluateToString(e, "templateId.root"));
|
||||
// <id extension="c266" root="2.16.840.1.113883.19.4"/>
|
||||
assertEquals("2.16.840.1.113883.19.4", fp.evaluateToString(e, "id.root"));
|
||||
assertEquals("c266", fp.evaluateToString(e, "id.extension"));
|
||||
|
||||
// <title>Good Health Clinic Consultation Note</title>
|
||||
assertEquals("Good Health Clinic Consultation Note", fp.evaluateToString(e, "title.dataString"));
|
||||
// <effectiveTime value="20000407"/>
|
||||
assertEquals("2000-04-07", fp.evaluateToString(e, "effectiveTime.value"));
|
||||
// <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
|
||||
assertEquals("N", fp.evaluateToString(e, "confidentialityCode.code"));
|
||||
assertEquals("2.16.840.1.113883.5.25", fp.evaluateToString(e, "confidentialityCode.codeSystem"));
|
||||
// <languageCode code="en-US"/>
|
||||
assertEquals("en-US", fp.evaluateToString(e, "languageCode.code"));
|
||||
// <setId extension="BB35" root="2.16.840.1.113883.19.7"/>
|
||||
assertEquals("BB35", fp.evaluateToString(e, "setId.extension"));
|
||||
assertEquals("2.16.840.1.113883.19.7", fp.evaluateToString(e, "setId.root"));
|
||||
// <versionNumber value="2"/>
|
||||
assertEquals("2", fp.evaluateToString(e, "versionNumber.value"));
|
||||
// <recordTarget>
|
||||
// <patientRole>
|
||||
// <id extension="12345" root="2.16.840.1.113883.19.5"/>
|
||||
assertEquals("12345", fp.evaluateToString(e, "recordTarget.patientRole.id.extension"));
|
||||
assertEquals("2.16.840.1.113883.19.5", fp.evaluateToString(e, "recordTarget.patientRole.id.root"));
|
||||
// <patient>
|
||||
// <name>
|
||||
// <family>Levin</family>
|
||||
assertEquals("Levin", fp.evaluateToString(e, "recordTarget.patientRole.patient.name.family.dataString"));
|
||||
// <given>Henry</given>
|
||||
assertEquals("Henry", fp.evaluateToString(e, "recordTarget.patientRole.patient.name.given.dataString"));
|
||||
// <suffix>the 7th</suffix>
|
||||
// </name>
|
||||
// <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
|
||||
// <birthTime value="19320924"/>
|
||||
// </patient>
|
||||
// <providerOrganization>
|
||||
// <id root="2.16.840.1.113883.19.5"/>
|
||||
// </providerOrganization>
|
||||
// </patientRole>
|
||||
// </recordTarget>
|
||||
|
||||
// <component>
|
||||
// <structuredBody>
|
||||
// <component>
|
||||
// <section>
|
||||
|
||||
// <component>
|
||||
// <section>
|
||||
// <code code="8709-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
||||
// <title>Skin Exam</title>
|
||||
// <text>Erythematous rash, palmar surface, left index finger.
|
||||
// <renderMultiMedia referencedObject="MM1"/>
|
||||
// </text>
|
||||
|
||||
assertEquals("Skin Exam", fp.evaluateToString(e, "component.structuredBody.component.section.component.section.where(code.code='8709-8' and code.codeSystem='2.16.840.1.113883.6.1').title.dataString"));
|
||||
// <div>Erythematous rash, palmar surface, left index finger.
|
||||
// <img src="MM1"/></div>
|
||||
String text = fp.evaluateToString(e, "component.structuredBody.component.section.component.section.where(code.code='8709-8' and code.codeSystem='2.16.840.1.113883.6.1').text");
|
||||
assertTrue(text.contains("<img src=\"MM1\"/>"));
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testDCI() throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
try {
|
||||
Element e = Manager.parse(context, new FileInputStream("C:\\work\\org.hl7.fhir.us\\ccda-to-fhir-maps\\cda\\IAT2-Discharge_Summary-DCI.xml"), FhirFormat.XML);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\temp\\ccda.xml"), FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Element e = Manager.parse(context,
|
||||
new FileInputStream("C:\\work\\org.hl7.fhir.us\\ccda-to-fhir-maps\\cda\\IAT2-Discharge_Summary-DCI.xml"),
|
||||
FhirFormat.XML);
|
||||
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\temp\\ccda.xml"), FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
// Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge_Summary-DCI.out.json"), FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
// Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge_Summary-DCI.out.ttl"), FhirFormat.TURTLE, OutputStyle.PRETTY, null);
|
||||
} catch (Exception e) {
|
||||
|
@ -44,20 +138,44 @@ public class CDARoundTripTests {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEpic() throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
Element e = Manager.parse(context, new FileInputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.xml"), FhirFormat.XML);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.xml"), FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.json"), FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.ttl"), FhirFormat.TURTLE, OutputStyle.PRETTY, null);
|
||||
@Ignore
|
||||
public void testEpic()
|
||||
throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
Element e = Manager.parse(context,
|
||||
new FileInputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.xml"),
|
||||
FhirFormat.XML);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.xml"),
|
||||
FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.json"),
|
||||
FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-Discharge-Homework-Epic.out.ttl"),
|
||||
FhirFormat.TURTLE, OutputStyle.PRETTY, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDHIT() throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
Element e = Manager.parse(context, new FileInputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.xml"), FhirFormat.XML);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.xml"), FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.json"), FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e, new FileOutputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.ttl"), FhirFormat.TURTLE, OutputStyle.PRETTY, null);
|
||||
@Ignore
|
||||
public void testDHIT()
|
||||
throws FHIRFormatError, DefinitionException, FileNotFoundException, IOException, FHIRException {
|
||||
Element e = Manager.parse(context,
|
||||
new FileInputStream("C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.xml"),
|
||||
FhirFormat.XML);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.xml"),
|
||||
FhirFormat.XML, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.json"),
|
||||
FhirFormat.JSON, OutputStyle.PRETTY, null);
|
||||
Manager.compose(context, e,
|
||||
new FileOutputStream(
|
||||
"C:\\work\\org.hl7.fhir.test\\ccda-to-fhir-maps\\testdocuments\\IAT2-DS-Homework-DHIT.out.ttl"),
|
||||
FhirFormat.TURTLE, OutputStyle.PRETTY, null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,234 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<StructureDefinition xmlns="http://hl7.org/fhir">
|
||||
<id value="ANY"/>
|
||||
<text>
|
||||
<status value="generated"/>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<p>Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type.</p>
|
||||
|
||||
<hr/>
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;">
|
||||
<tr style="border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;">
|
||||
<th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<a href="nullformats.html#table" title="The logical name of the element">Name</a>
|
||||
</th>
|
||||
<th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<a href="nullformats.html#table" title="Information about the use of the element">Flags</a>
|
||||
</th>
|
||||
<th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<a href="nullformats.html#table" title="Minimum and Maximum # of times the the element can appear in the instance">Card.</a>
|
||||
</th>
|
||||
<th style="width: 100px" class="hierarchy">
|
||||
<a href="nullformats.html#table" title="Reference to the type of the element">Type</a>
|
||||
</th>
|
||||
<th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<a href="nullformats.html#table" title="Additional information about the element">Description & Constraints</a>
|
||||
<span style="float: right">
|
||||
<a href="nullformats.html#table" title="Legend for this format">
|
||||
<img src="nullhelp16.png" alt="doco" style="background-color: inherit"/>
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white;">
|
||||
<td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)" class="hierarchy">
|
||||
<img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/>
|
||||
<img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
|
||||
<span title="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type.">ANY</span>
|
||||
<a name="ANY"> </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">1..*</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"/>
|
||||
</tr>
|
||||
|
||||
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7;">
|
||||
<td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck00.png)" class="hierarchy">
|
||||
<img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/>
|
||||
<img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/>
|
||||
<img src="icon_primitive.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
|
||||
<span title="If a value is an exceptional value (NULL-value), this specifies in what way and why proper information is missing.">nullFlavor</span>
|
||||
<a name="ANY.nullFlavor"> </a>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/>
|
||||
<td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
|
||||
<td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<a href="nulldatatypes.html#code">code</a>
|
||||
</td>
|
||||
<td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">
|
||||
<span style="font-weight:bold">Binding: </span>
|
||||
<a href="ANY.nullFlavor/something.html">something</a> (
|
||||
<a href="nullterminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="hierarchy">
|
||||
<br/>
|
||||
<a href="nullformats.html#table" title="Legend for this format">
|
||||
<img src="nullhelp16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</text>
|
||||
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace">
|
||||
<valueUri value="urn:hl7-org:v3"/>
|
||||
</extension>
|
||||
<url value="http://hl7.org/fhir/cda/StructureDefinition/ANY"/>
|
||||
<name value="ANY"/>
|
||||
<title value="ANY: DataValue (V3 Data Type)"/>
|
||||
<status value="active"/>
|
||||
<experimental value="false"/>
|
||||
<publisher value="HL7"/>
|
||||
<description value="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type."/>
|
||||
<mapping>
|
||||
<identity value="rim"/>
|
||||
<uri value="http://hl7.org/v3"/>
|
||||
<name value="RIM Mapping"/>
|
||||
</mapping>
|
||||
<kind value="logical"/>
|
||||
<abstract value="true"/>
|
||||
<type value="ANY"/>
|
||||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element"/>
|
||||
<derivation value="specialization"/>
|
||||
<snapshot>
|
||||
<element id="ANY">
|
||||
<path value="ANY"/>
|
||||
<short value="Base for all elements"/>
|
||||
<definition value="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type."/>
|
||||
<min value="1"/>
|
||||
<max value="*"/>
|
||||
<base>
|
||||
<path value="Element"/>
|
||||
<min value="0"/>
|
||||
<max value="*"/>
|
||||
</base>
|
||||
<condition value="ele-1"/>
|
||||
<constraint>
|
||||
<key value="ele-1"/>
|
||||
<severity value="error"/>
|
||||
<human value="All FHIR elements must have a @value or children"/>
|
||||
<expression value="hasValue() or (children().count() > id.count())"/>
|
||||
<xpath value="@value|f:*|h:div"/>
|
||||
<source value="ANY"/>
|
||||
</constraint>
|
||||
<isModifier value="false"/>
|
||||
<mapping>
|
||||
<identity value="rim"/>
|
||||
<map value="n/a"/>
|
||||
</mapping>
|
||||
</element>
|
||||
<element id="ANY.id">
|
||||
<path value="ANY.id"/>
|
||||
<representation value="xmlAttr"/>
|
||||
<short value="Unique id for inter-element referencing"/>
|
||||
<definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
<base>
|
||||
<path value="Element.id"/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
</base>
|
||||
<type>
|
||||
<code>
|
||||
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
|
||||
<valueString value="string"/>
|
||||
</extension>
|
||||
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
|
||||
<valueString value="xsd:string"/>
|
||||
</extension>
|
||||
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-rdf-type">
|
||||
<valueString value="xsd:string"/>
|
||||
</extension>
|
||||
</code>
|
||||
</type>
|
||||
<isModifier value="false"/>
|
||||
<isSummary value="false"/>
|
||||
<mapping>
|
||||
<identity value="rim"/>
|
||||
<map value="n/a"/>
|
||||
</mapping>
|
||||
</element>
|
||||
<element id="ANY.extension">
|
||||
<path value="ANY.extension"/>
|
||||
<slicing>
|
||||
<discriminator>
|
||||
<type value="value"/>
|
||||
<path value="url"/>
|
||||
</discriminator>
|
||||
<description value="Extensions are always sliced by (at least) url"/>
|
||||
<rules value="open"/>
|
||||
</slicing>
|
||||
<short value="Additional content defined by implementations"/>
|
||||
<definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
|
||||
<comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
|
||||
<alias value="extensions"/>
|
||||
<alias value="user content"/>
|
||||
<min value="0"/>
|
||||
<max value="*"/>
|
||||
<base>
|
||||
<path value="Element.extension"/>
|
||||
<min value="0"/>
|
||||
<max value="*"/>
|
||||
</base>
|
||||
<type>
|
||||
<code value="Extension"/>
|
||||
</type>
|
||||
<isModifier value="false"/>
|
||||
<isSummary value="false"/>
|
||||
<mapping>
|
||||
<identity value="rim"/>
|
||||
<map value="n/a"/>
|
||||
</mapping>
|
||||
</element>
|
||||
<element id="ANY.nullFlavor">
|
||||
<path value="ANY.nullFlavor"/>
|
||||
<representation value="xmlAttr"/>
|
||||
<label value="Exceptional Value Detail"/>
|
||||
<definition value="If a value is an exceptional value (NULL-value), this specifies in what way and why proper information is missing."/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
<base>
|
||||
<path value="ANY.nullFlavor"/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
</base>
|
||||
<type>
|
||||
<code value="code"/>
|
||||
</type>
|
||||
<binding>
|
||||
<strength value="required"/>
|
||||
<valueSet value="http://terminology.hl7.org/ValueSet/v3-NullFlavor"/>
|
||||
</binding>
|
||||
</element>
|
||||
</snapshot>
|
||||
<differential>
|
||||
<element id="ANY">
|
||||
<path value="ANY"/>
|
||||
<definition value="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type."/>
|
||||
<min value="1"/>
|
||||
<max value="*"/>
|
||||
</element>
|
||||
<element id="ANY.nullFlavor">
|
||||
<path value="ANY.nullFlavor"/>
|
||||
<representation value="xmlAttr"/>
|
||||
<label value="Exceptional Value Detail"/>
|
||||
<definition value="If a value is an exceptional value (NULL-value), this specifies in what way and why proper information is missing."/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
<type>
|
||||
<code value="code"/>
|
||||
</type>
|
||||
<binding>
|
||||
<strength value="required"/>
|
||||
<valueSet value="http://terminology.hl7.org/ValueSet/v3-NullFlavor"/>
|
||||
</binding>
|
||||
</element>
|
||||
</differential>
|
||||
</StructureDefinition>
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<StructureDefinition xmlns="http://hl7.org/fhir">
|
||||
<id value="ANY"/>
|
||||
<text>
|
||||
<status value="generated"/>
|
||||
<div xmlns="http://www.w3.org/1999/xhtml">
|
||||
<p>Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type.</p>
|
||||
</div>
|
||||
</text>
|
||||
<extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace">
|
||||
<valueUri value="urn:hl7-org:v3"/>
|
||||
</extension>
|
||||
<url value="http://hl7.org/fhir/cda/StructureDefinition/ANY"/>
|
||||
<name value="ANY"/>
|
||||
<title value="ANY: DataValue (V3 Data Type)"/>
|
||||
<status value="active"/>
|
||||
<experimental value="false"/>
|
||||
<publisher value="HL7"/>
|
||||
<description value="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type."/>
|
||||
<kind value="logical"/>
|
||||
<abstract value="true"/>
|
||||
<type value="ANY"/>
|
||||
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element"/>
|
||||
<derivation value="specialization"/>
|
||||
<differential>
|
||||
<element id="ANY">
|
||||
<path value="ANY"/>
|
||||
<definition value="Defines the basic properties of every data value. This is an abstract type, meaning that no value can be just a data value without belonging to any concrete type. Every concrete type is a specialization of this general abstract DataValue type."/>
|
||||
<min value="1"/>
|
||||
<max value="*"/>
|
||||
</element>
|
||||
<element id="ANY.nullFlavor">
|
||||
<path value="ANY.nullFlavor"/>
|
||||
<representation value="xmlAttr"/>
|
||||
<label value="Exceptional Value Detail"/>
|
||||
<definition value="If a value is an exceptional value (NULL-value), this specifies in what way and why proper information is missing."/>
|
||||
<min value="0"/>
|
||||
<max value="1"/>
|
||||
<type>
|
||||
<code value="code"/>
|
||||
</type>
|
||||
<binding>
|
||||
<strength value="required"/>
|
||||
<valueSet value="http://terminology.hl7.org/ValueSet/v3-NullFlavor"/>
|
||||
</binding>
|
||||
</element>
|
||||
</differential>
|
||||
</StructureDefinition>
|
|
@ -230,4 +230,5 @@
|
|||
<test gen="true" id="au2"/>
|
||||
<test gen="true" id="au3"/>
|
||||
<test gen="true" id="dv1"/>
|
||||
<test gen="true" id="logical1"/>
|
||||
</snapshot-generation-tests>
|
||||
|
|
|
@ -187,7 +187,7 @@ public class CDANarrativeFormat {
|
|||
private void processRenderMultiMedia(Element e, XhtmlNode xn) throws FHIRException {
|
||||
XhtmlNode xc = xn.addTag("img");
|
||||
String v = e.getAttribute("referencedObject");
|
||||
xn.attribute("src", v);
|
||||
xc.attribute("src", v);
|
||||
processAttributes(e, xc, "ID", "language", "styleCode");
|
||||
processChildren(e, xc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue