Update to DSTU3 Montreal definitions

This commit is contained in:
jamesagnew 2016-04-03 18:14:31 -04:00
parent 57abd0a3bb
commit 18b3d0df65
405 changed files with 294861 additions and 923472 deletions

View File

@ -731,7 +731,15 @@ class ModelScanner {
providesMembershipInCompartments = new HashSet<String>();
for (Compartment next : searchParam.providesMembershipIn()) {
if (paramType != RestSearchParameterTypeEnum.REFERENCE) {
throw new ConfigurationException("Search param " + searchParam.name() + " provides compartment membershit but is not of type 'reference'");
StringBuilder b = new StringBuilder();
b.append("Search param ");
b.append(searchParam.name());
b.append(" on resource type ");
b.append(theClass.getName());
b.append(" provides compartment membership but is not of type 'reference'");
ourLog.warn(b.toString());
continue;
// throw new ConfigurationException(b.toString());
}
providesMembershipInCompartments.add(next.name());
}

View File

@ -63,7 +63,7 @@ public class ValidationResult {
* Was the validation successful (in other words, do we have no issues that are at
* severity {@link ResultSeverityEnum#ERROR} or {@link ResultSeverityEnum#FATAL}. A validation
* is still considered successful if it only has issues at level {@link ResultSeverityEnum#WARNING} or
* lower.
* lower.
*
* @return true if the validation was successful
*/
@ -74,6 +74,10 @@ public class ValidationResult {
private String toDescription() {
StringBuilder b = new StringBuilder(100);
if (myMessages.size() > 0) {
if (myMessages.get(0).getSeverity() != null) {
b.append(myMessages.get(0).getSeverity().name());
b.append(" - ");
}
b.append(myMessages.get(0).getMessage());
b.append(" - ");
b.append(myMessages.get(0).getLocationString());

View File

@ -88,9 +88,19 @@
</td>
<td th:text="${result.resource.statusElement.value}">final</td>
</tr>
<tr th:if="${not result.resource.commentsElement.empty}" th:class="${rowStat.odd}? 'hapiTableOfValuesRowOdd' : 'hapiTableOfValuesRowEven'" class="hapiTableOfValuesRowOdd">
<td th:text="${result.resource.commentsElement.value}" colspan="5">This is a comment</td>
</tr>
<th:block th:switch="${fhirVersion}">
<th:block th:case="'DSTU3'">
<tr th:if="${not result.resource.commentElement.empty}" th:class="${rowStat.odd}? 'hapiTableOfValuesRowOdd' : 'hapiTableOfValuesRowEven'" class="hapiTableOfValuesRowOdd">
<td th:text="${result.resource.commentElement.value}" colspan="5">This is a comment</td>
</tr>
</th:block>
<th:block th:case="*">
<tr th:if="${not result.resource.commentsElement.empty}" th:class="${rowStat.odd}? 'hapiTableOfValuesRowOdd' : 'hapiTableOfValuesRowEven'" class="hapiTableOfValuesRowOdd">
<td th:text="${result.resource.commentsElement.value}" colspan="5">This is a comment</td>
</tr>
</th:block>
</th:block>
<!--/* The following are just examples that don't appear in the generated narrative -->
<tr class="hapiTableOfValuesRowEven"><td>Lkc</td><td>198 g/L</td><td>H</td><td>78 g/L - 99 g/L</td><td>final</td></tr>

View File

@ -1,7 +1,6 @@
package ca.uhn.fhir.jpa.config.dstu3;
import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator;
import org.hl7.fhir.dstu3.hapi.validation.FhirQuestionnaireResponseValidator;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.validation.IResourceValidator.BestPracticeWarningLevel;

View File

@ -43,7 +43,7 @@ public class BaseSearchParamExtractor {
protected List<Object> extractValues(String thePaths, IBaseResource theResource) {
List<Object> values = new ArrayList<Object>();
String[] nextPathsSplit = thePaths.split("\\|");
String[] nextPathsSplit = thePaths.split("\\||or");
FhirTerser t = myContext.newTerser();
for (String nextPath : nextPathsSplit) {
String nextPathTrimmed = nextPath.trim();

View File

@ -56,7 +56,7 @@ import ca.uhn.fhir.rest.server.IBundleProvider;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>implements IFhirResourceDaoValueSet<ValueSet, CodingDt, CodeableConceptDt> {
public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet> implements IFhirResourceDaoValueSet<ValueSet, CodingDt, CodeableConceptDt>, IFhirResourceDaoCodeSystem<ValueSet, CodingDt, CodeableConceptDt> {
@Autowired
private IJpaValidationSupportDstu2 myJpaValidationSupport;
@ -208,7 +208,7 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
}
String code = theCode.getValue();
String system = toStringOrNull(theSystem);
valueSetIds = findValueSetIdsContainingSystemAndCode(code, system);
valueSetIds = findCodeSystemIdsContainingSystemAndCode(code, system);
}
for (IIdType nextId : valueSetIds) {
@ -228,7 +228,8 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
return new ValidateCodeResult(false, "Code not found", null);
}
private List<IIdType> findValueSetIdsContainingSystemAndCode(String theCode, String theSystem) {
@Override
public List<IIdType> findCodeSystemIdsContainingSystemAndCode(String theCode, String theSystem) {
if (theSystem != null && theSystem.startsWith("http://hl7.org/fhir/")) {
return Collections.singletonList((IIdType)new IdDt(theSystem));
}
@ -289,7 +290,7 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
}
@Override
public ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, CodingDt theCoding, RequestDetails theRequestDetails) {
public LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, CodingDt theCoding, RequestDetails theRequestDetails) {
boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode());
boolean haveCode = theCode != null && theCode.isEmpty() == false;
boolean haveSystem = theSystem != null && theSystem.isEmpty() == false;
@ -311,11 +312,11 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
system = theSystem.getValue();
}
List<IIdType> valueSetIds = findValueSetIdsContainingSystemAndCode(code, system);
List<IIdType> valueSetIds = findCodeSystemIdsContainingSystemAndCode(code, system);
for (IIdType nextId : valueSetIds) {
ValueSet expansion = expand(nextId, null);
List<ExpansionContains> contains = expansion.getExpansion().getContains();
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult result = lookup(contains, system, code);
LookupCodeResult result = lookup(contains, system, code);
if (result != null) {
return result;
}
@ -328,13 +329,13 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
return retVal;
}
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult lookup(List<ExpansionContains> theContains, String theSystem, String theCode) {
private LookupCodeResult lookup(List<ExpansionContains> theContains, String theSystem, String theCode) {
for (ExpansionContains nextCode : theContains) {
String system = nextCode.getSystem();
String code = nextCode.getCode();
if (theSystem.equals(system) && theCode.equals(code)) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult retVal = new LookupCodeResult();
LookupCodeResult retVal = new LookupCodeResult();
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
retVal.setFound(true);
@ -357,4 +358,5 @@ public class FhirResourceDaoValueSetDstu2 extends FhirResourceDaoDstu2<ValueSet>
// nothing
}
}

View File

@ -0,0 +1,103 @@
package ca.uhn.fhir.jpa.dao;
import java.util.List;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2016 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.rest.method.RequestDetails;
public interface IFhirResourceDaoCodeSystem<T extends IBaseResource, CD, CC> extends IFhirResourceDao<T> {
List<IIdType> findCodeSystemIdsContainingSystemAndCode(String theCode, String theSystem);
LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, CD theCoding, RequestDetails theRequestDetails);
public class LookupCodeResult {
private String myCodeDisplay;
private boolean myCodeIsAbstract;
private String myCodeSystemDisplayName;
private String myCodeSystemVersion;
private boolean myFound;
private String mySearchedForCode;
private String mySearchedForSystem;
public String getCodeDisplay() {
return myCodeDisplay;
}
public String getCodeSystemDisplayName() {
return myCodeSystemDisplayName;
}
public String getCodeSystemVersion() {
return myCodeSystemVersion;
}
public String getSearchedForCode() {
return mySearchedForCode;
}
public String getSearchedForSystem() {
return mySearchedForSystem;
}
public boolean isCodeIsAbstract() {
return myCodeIsAbstract;
}
public boolean isFound() {
return myFound;
}
public void setCodeDisplay(String theCodeDisplay) {
myCodeDisplay = theCodeDisplay;
}
public void setCodeIsAbstract(boolean theCodeIsAbstract) {
myCodeIsAbstract = theCodeIsAbstract;
}
public void setCodeSystemDisplayName(String theCodeSystemDisplayName) {
myCodeSystemDisplayName = theCodeSystemDisplayName;
}
public void setCodeSystemVersion(String theCodeSystemVersion) {
myCodeSystemVersion = theCodeSystemVersion;
}
public void setFound(boolean theFound) {
myFound = theFound;
}
public void setSearchedForCode(String theSearchedForCode) {
mySearchedForCode = theSearchedForCode;
}
public void setSearchedForSystem(String theSearchedForSystem) {
mySearchedForSystem = theSearchedForSystem;
}
}
}

View File

@ -24,8 +24,6 @@ import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import ca.uhn.fhir.rest.method.RequestDetails;
public interface IFhirResourceDaoValueSet<T extends IBaseResource, CD, CC> extends IFhirResourceDao<T> {
T expand(IIdType theId, String theFilter);
@ -34,78 +32,10 @@ public interface IFhirResourceDaoValueSet<T extends IBaseResource, CD, CC> exten
T expandByIdentifier(String theUri, String theFilter);
LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, CD theCoding, RequestDetails theRequestDetails);
void purgeCaches();
ValidateCodeResult validateCode(IPrimitiveType<String> theValueSetIdentifier, IIdType theId, IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, IPrimitiveType<String> theDisplay, CD theCoding, CC theCodeableConcept);
public class LookupCodeResult {
private String myCodeDisplay;
private boolean myCodeIsAbstract;
private String myCodeSystemDisplayName;
private String myCodeSystemVersion;
private boolean myFound;
private String mySearchedForCode;
private String mySearchedForSystem;
public String getCodeDisplay() {
return myCodeDisplay;
}
public String getCodeSystemDisplayName() {
return myCodeSystemDisplayName;
}
public String getCodeSystemVersion() {
return myCodeSystemVersion;
}
public String getSearchedForCode() {
return mySearchedForCode;
}
public String getSearchedForSystem() {
return mySearchedForSystem;
}
public boolean isCodeIsAbstract() {
return myCodeIsAbstract;
}
public boolean isFound() {
return myFound;
}
public void setCodeDisplay(String theCodeDisplay) {
myCodeDisplay = theCodeDisplay;
}
public void setCodeIsAbstract(boolean theCodeIsAbstract) {
myCodeIsAbstract = theCodeIsAbstract;
}
public void setCodeSystemDisplayName(String theCodeSystemDisplayName) {
myCodeSystemDisplayName = theCodeSystemDisplayName;
}
public void setCodeSystemVersion(String theCodeSystemVersion) {
myCodeSystemVersion = theCodeSystemVersion;
}
public void setFound(boolean theFound) {
myFound = theFound;
}
public void setSearchedForCode(String theSearchedForCode) {
mySearchedForCode = theSearchedForCode;
}
public void setSearchedForSystem(String theSearchedForSystem) {
mySearchedForSystem = theSearchedForSystem;
}
}
public class ValidateCodeResult {
private String myDisplay;
private String myMessage;

View File

@ -0,0 +1,167 @@
package ca.uhn.fhir.jpa.dao.dstu3;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.hl7.fhir.dstu3.hapi.validation.HapiWorkerContext;
import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.springframework.beans.factory.annotation.Autowired;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.util.LogicUtil;
import ca.uhn.fhir.rest.method.RequestDetails;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public class FhirResourceDaoCodeSystemDstu3 extends FhirResourceDaoDstu3<CodeSystem> implements IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> {
@Autowired
private ValidationSupportChain myValidationSupport;
@Override
public List<IIdType> findCodeSystemIdsContainingSystemAndCode(String theCode, String theSystem) {
// if (theSystem != null && theSystem.startsWith("http://hl7.org/fhir/ValueSet")) {
// return Collections.singletonList((IIdType) new IdType(theSystem));
// }
List<IIdType> valueSetIds;
Set<Long> ids = searchForIds(CodeSystem.SP_CODE, new TokenParam(theSystem, theCode));
valueSetIds = new ArrayList<IIdType>();
for (Long next : ids) {
valueSetIds.add(new IdType("CodeSystem", next));
}
return valueSetIds;
}
@Override
public LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, Coding theCoding,
RequestDetails theRequestDetails) {
boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode());
boolean haveCode = theCode != null && theCode.isEmpty() == false;
boolean haveSystem = theSystem != null && theSystem.isEmpty() == false;
if (!haveCoding && !(haveSystem && haveCode)) {
throw new InvalidRequestException("No code, coding, or codeableConcept provided to validate");
}
if (!LogicUtil.multiXor(haveCoding, (haveSystem && haveCode)) || (haveSystem != haveCode)) {
throw new InvalidRequestException("$lookup can only validate (system AND code) OR (coding.system AND coding.code)");
}
String code;
String system;
if (haveCoding) {
code = theCoding.getCode();
system = theCoding.getSystem();
} else {
code = theCode.getValue();
system = theSystem.getValue();
}
// CodeValidationResult validateOutcome = myJpaValidationSupport.validateCode(getContext(), system, code, null);
//
// LookupCodeResult result = new LookupCodeResult();
// result.setSearchedForCode(code);
// result.setSearchedForSystem(system);
// result.setFound(false);
// if (validateOutcome.isOk()) {
// result.setFound(true);
// result.setCodeIsAbstract(validateOutcome.asConceptDefinition().getAbstract());
// result.setCodeDisplay(validateOutcome.asConceptDefinition().getDisplay());
// }
// return result;
if (myValidationSupport.isCodeSystemSupported(getContext(), system)) {
HapiWorkerContext ctx = new HapiWorkerContext(getContext(), myValidationSupport);
ValueSetExpander expander = ctx.getExpander();
ValueSet source = new ValueSet();
source.getCompose().addInclude().setSystem(system).addConcept().setCode(code);
ValueSetExpansionOutcome expansion;
try {
expansion = expander.expand(source);
} catch (Exception e) {
throw new InternalErrorException(e);
}
if (expansion.getValueset() != null) {
List<ValueSetExpansionContainsComponent> contains = expansion.getValueset().getExpansion().getContains();
LookupCodeResult result = lookup(contains, system, code);
if (result != null) {
return result;
}
}
} else {
/*
* If it's not a built-in code system, use ones from the database
*/
List<IIdType> valueSetIds = findCodeSystemIdsContainingSystemAndCode(code, system);
for (IIdType nextId : valueSetIds) {
CodeSystem expansion = read(nextId, theRequestDetails);
for (ConceptDefinitionComponent next : expansion.getConcept()) {
if (code.equals(next.getCode())) {
LookupCodeResult retVal = new LookupCodeResult();
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
retVal.setFound(true);
retVal.setCodeDisplay(next.getDisplay());
retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement
return retVal;
}
}
}
}
// We didn't find it..
LookupCodeResult retVal = new LookupCodeResult();
retVal.setFound(false);
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
return retVal;
}
private LookupCodeResult lookup(List<ValueSetExpansionContainsComponent> theContains, String theSystem, String theCode) {
for (ValueSetExpansionContainsComponent nextCode : theContains) {
String system = nextCode.getSystem();
String code = nextCode.getCode();
if (theSystem.equals(system) && theCode.equals(code)) {
LookupCodeResult retVal = new LookupCodeResult();
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
retVal.setFound(true);
if (nextCode.getAbstractElement().getValue() != null) {
retVal.setCodeIsAbstract(nextCode.getAbstractElement().booleanValue());
}
retVal.setCodeDisplay(nextCode.getDisplay());
retVal.setCodeSystemVersion(nextCode.getVersion());
retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement
return retVal;
}
}
return null;
}
}

View File

@ -37,27 +37,28 @@ import org.apache.commons.codec.binary.StringUtils;
import org.hl7.fhir.dstu3.hapi.validation.DefaultProfileValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.HapiWorkerContext;
import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.springframework.beans.factory.annotation.Autowired;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem.LookupCodeResult;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.rest.method.RequestDetails;
import ca.uhn.fhir.jpa.util.LogicUtil;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.param.UriParam;
import ca.uhn.fhir.rest.server.IBundleProvider;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet> implements IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> {
@ -69,6 +70,9 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
private DefaultProfileValidationSupport myDefaultProfileValidationSupport;
@Autowired
private IFhirResourceDaoCodeSystem<CodeSystem, CodeableConcept, Coding> myCodeSystemDao;
@Override
@PostConstruct
public void postConstruct() {
@ -85,15 +89,22 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
@Override
public ValueSet expand(IIdType theId, String theFilter) {
ValueSet source = myValidationSupport.fetchResource(getContext(), ValueSet.class, theId.getValue());
ValueSet retVal = doExpand(source, theFilter);
return retVal;
}
private ValueSet doExpand(ValueSet source, String theFilter) {
HapiWorkerContext workerContext = new HapiWorkerContext(getContext(), myValidationSupport);
ValueSet source = workerContext.fetchResource(ValueSet.class, theId.getValue());
String filterLc = theFilter != null ? theFilter.toLowerCase() : null;
ValueSetExpansionOutcome outcome = workerContext.expand(source);
ValueSetExpansionComponent expansion = outcome.getValueset().getExpansion();
if (isNotBlank(theFilter)) {
for (Iterator<ValueSetExpansionContainsComponent> containsIter = expansion.getContains().iterator(); containsIter.hasNext();) {
ValueSetExpansionContainsComponent nextContains = containsIter.next();
if (!nextContains.getDisplay().toLowerCase().contains(theFilter.toLowerCase())) {
if (!nextContains.getDisplay().toLowerCase().contains(filterLc) && !nextContains.getCode().toLowerCase().contains(filterLc)) {
containsIter.remove();
}
}
@ -109,67 +120,68 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
if (isBlank(theUri)) {
throw new InvalidRequestException("URI must not be blank or missing");
}
ValueSet source;
ValueSet source = myValidationSupport.fetchResource(getContext(), ValueSet.class, theUri);
org.hl7.fhir.instance.model.ValueSet defaultValueSet = myDefaultProfileValidationSupport.fetchResource(getContext(), org.hl7.fhir.instance.model.ValueSet.class, theUri);
if (defaultValueSet != null) {
source = getContext().newJsonParser().parseResource(ValueSet.class, getContext().newJsonParser().encodeResourceToString(defaultValueSet));
} else {
IBundleProvider ids = search(ValueSet.SP_URL, new UriParam(theUri));
if (ids.size() == 0) {
throw new InvalidRequestException("Unknown ValueSet URI: " + theUri);
}
source = (ValueSet) ids.getResources(0, 1).get(0);
}
ValueSet retVal = doExpand(source, theFilter);
return retVal;
return expand(source, theFilter);
// if (defaultValueSet != null) {
// source = getContext().newJsonParser().parseResource(ValueSet.class, getContext().newJsonParser().encodeResourceToString(defaultValueSet));
// } else {
// IBundleProvider ids = search(ValueSet.SP_URL, new UriParam(theUri));
// if (ids.size() == 0) {
// throw new InvalidRequestException("Unknown ValueSet URI: " + theUri);
// }
// source = (ValueSet) ids.getResources(0, 1).get(0);
// }
//
// return expand(defaultValueSet, theFilter);
}
@Override
public ValueSet expand(ValueSet source, String theFilter) {
ValueSet retVal = new ValueSet();
retVal.setDate(new Date());
/*
* Add composed concepts
*/
for (ConceptSetComponent nextInclude : source.getCompose().getInclude()) {
for (ConceptReferenceComponent next : nextInclude.getConcept()) {
if (isBlank(theFilter)) {
addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay());
} else {
String filter = theFilter.toLowerCase();
if (next.getDisplay().toLowerCase().contains(filter) || next.getCode().toLowerCase().contains(filter)) {
addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay());
}
}
}
}
/*
* Add defined concepts
*/
for (ConceptDefinitionComponent next : source.getCodeSystem().getConcept()) {
addCompose(theFilter, retVal, source, next);
}
ValueSet retVal = doExpand(source, theFilter);
return retVal;
// ValueSet retVal = new ValueSet();
// retVal.setDate(new Date());
//
// /*
// * Add composed concepts
// */
//
// for (ConceptSetComponent nextInclude : source.getCompose().getInclude()) {
// if (nextInclude.getConcept().isEmpty()) {
//
// } else {
// for (ConceptReferenceComponent next : nextInclude.getConcept()) {
// if (isBlank(theFilter)) {
// addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay());
// } else {
// String filter = theFilter.toLowerCase();
// if (next.getDisplay().toLowerCase().contains(filter) || next.getCode().toLowerCase().contains(filter)) {
// addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay());
// }
// }
// }
// }
// }
//
// return retVal;
}
private void addCompose(String theFilter, ValueSet theValueSetToPopulate, ValueSet theSourceValueSet, ConceptDefinitionComponent theConcept) {
private void addCompose(String theFilter, ValueSet theValueSetToPopulate, ValueSet theSourceValueSet, ConceptDefinitionComponent theConcept, String theSystem) {
if (isBlank(theFilter)) {
addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay());
addCompose(theValueSetToPopulate, theSystem, theConcept.getCode(), theConcept.getDisplay());
} else {
String filter = theFilter.toLowerCase();
if (theConcept.getDisplay().toLowerCase().contains(filter) || theConcept.getCode().toLowerCase().contains(filter)) {
addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay());
addCompose(theValueSetToPopulate, theSystem, theConcept.getCode(), theConcept.getDisplay());
}
}
for (ConceptDefinitionComponent nextChild : theConcept.getConcept()) {
addCompose(theFilter, theValueSetToPopulate, theSourceValueSet, nextChild);
addCompose(theFilter, theValueSetToPopulate, theSourceValueSet, nextChild, theSystem);
}
}
@ -184,9 +196,11 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
}
@Override
public ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCode(IPrimitiveType<String> theValueSetIdentifier, IIdType theId, IPrimitiveType<String> theCode,
IPrimitiveType<String> theSystem, IPrimitiveType<String> theDisplay, Coding theCoding, CodeableConcept theCodeableConcept) {
List<IIdType> valueSetIds;
public ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCode(IPrimitiveType<String> theValueSetIdentifier, IIdType theId, IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, IPrimitiveType<String> theDisplay, Coding theCoding,
CodeableConcept theCodeableConcept) {
List<IIdType> valueSetIds = Collections.emptyList();
List<IIdType> codeSystemIds = Collections.emptyList();
boolean haveCodeableConcept = theCodeableConcept != null && theCodeableConcept.getCoding().size() > 0;
boolean haveCoding = theCoding != null && theCoding.isEmpty() == false;
@ -195,7 +209,7 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
if (!haveCodeableConcept && !haveCoding && !haveCode) {
throw new InvalidRequestException("No code, coding, or codeableConcept provided to validate");
}
if (!multiXor(haveCodeableConcept, haveCoding, haveCode)) {
if (!LogicUtil.multiXor(haveCodeableConcept, haveCoding, haveCode)) {
throw new InvalidRequestException("$validate-code can only validate (system AND code) OR (coding) OR (codeableConcept)");
}
@ -212,9 +226,13 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
if (theCode == null || theCode.isEmpty()) {
throw new InvalidRequestException("Either ValueSet ID or ValueSet identifier or system and code must be provided. Unable to validate.");
}
String code = theCode.getValue();
String system = toStringOrNull(theSystem);
valueSetIds = findValueSetIdsContainingSystemAndCode(code, system);
// String code = theCode.getValue();
// String system = toStringOrNull(theSystem);
LookupCodeResult result = myCodeSystemDao.lookupCode(theCode, theSystem, null, null);
if (result.isFound()) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult retVal = new ValidateCodeResult(true, "Found code", result.getCodeDisplay());
return retVal;
}
}
for (IIdType nextId : valueSetIds) {
@ -231,39 +249,28 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
}
}
return new ValidateCodeResult(false, "Code not found", null);
}
private List<IIdType> findValueSetIdsContainingSystemAndCode(String theCode, String theSystem) {
// if (theSystem != null && theSystem.startsWith("http://hl7.org/fhir/ValueSet")) {
// return Collections.singletonList((IIdType) new IdType(theSystem));
// }
List<IIdType> valueSetIds;
Set<Long> ids = searchForIds(ValueSet.SP_CODE, new TokenParam(theSystem, theCode));
valueSetIds = new ArrayList<IIdType>();
for (Long next : ids) {
valueSetIds.add(new IdType("ValueSet", next));
}
return valueSetIds;
}
private static boolean multiXor(boolean... theValues) {
int count = 0;
for (int i = 0; i < theValues.length; i++) {
if (theValues[i]) {
count++;
for (IIdType nextId : codeSystemIds) {
ValueSet expansion = expand(nextId, null);
List<ValueSetExpansionContainsComponent> contains = expansion.getExpansion().getContains();
ValidateCodeResult result = validateCodeIsInContains(contains, toStringOrNull(theSystem), toStringOrNull(theCode), theCoding, theCodeableConcept);
if (result != null) {
if (theDisplay != null && isNotBlank(theDisplay.getValue()) && isNotBlank(result.getDisplay())) {
if (!theDisplay.getValue().equals(result.getDisplay())) {
return new ValidateCodeResult(false, "Display for code does not match", result.getDisplay());
}
}
return result;
}
}
return count == 1;
return new ValidateCodeResult(false, "Code not found", null);
}
private String toStringOrNull(IPrimitiveType<String> thePrimitive) {
return thePrimitive != null ? thePrimitive.getValue() : null;
}
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCodeIsInContains(List<ValueSetExpansionContainsComponent> contains, String theSystem, String theCode,
Coding theCoding, CodeableConcept theCodeableConcept) {
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCodeIsInContains(List<ValueSetExpansionContainsComponent> contains, String theSystem, String theCode, Coding theCoding, CodeableConcept theCodeableConcept) {
for (ValueSetExpansionContainsComponent nextCode : contains) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult result = validateCodeIsInContains(nextCode.getContains(), theSystem, theCode, theCoding, theCodeableConcept);
if (result != null) {
@ -294,119 +301,4 @@ public class FhirResourceDaoValueSetDstu3 extends FhirResourceDaoDstu3<ValueSet>
return null;
}
@Override
public ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult lookupCode(IPrimitiveType<String> theCode, IPrimitiveType<String> theSystem, Coding theCoding,
RequestDetails theRequestDetails) {
boolean haveCoding = theCoding != null && isNotBlank(theCoding.getSystem()) && isNotBlank(theCoding.getCode());
boolean haveCode = theCode != null && theCode.isEmpty() == false;
boolean haveSystem = theSystem != null && theSystem.isEmpty() == false;
if (!haveCoding && !(haveSystem && haveCode)) {
throw new InvalidRequestException("No code, coding, or codeableConcept provided to validate");
}
if (!multiXor(haveCoding, (haveSystem && haveCode)) || (haveSystem != haveCode)) {
throw new InvalidRequestException("$lookup can only validate (system AND code) OR (coding.system AND coding.code)");
}
String code;
String system;
if (haveCoding) {
code = theCoding.getCode();
system = theCoding.getSystem();
} else {
code = theCode.getValue();
system = theSystem.getValue();
}
// CodeValidationResult validateOutcome = myJpaValidationSupport.validateCode(getContext(), system, code, null);
//
// LookupCodeResult result = new LookupCodeResult();
// result.setSearchedForCode(code);
// result.setSearchedForSystem(system);
// result.setFound(false);
// if (validateOutcome.isOk()) {
// result.setFound(true);
// result.setCodeIsAbstract(validateOutcome.asConceptDefinition().getAbstract());
// result.setCodeDisplay(validateOutcome.asConceptDefinition().getDisplay());
// }
// return result;
if (myValidationSupport.isCodeSystemSupported(getContext(), system)) {
HapiWorkerContext ctx = new HapiWorkerContext(getContext(), myValidationSupport);
ValueSetExpander expander = ctx.getExpander();
ValueSet source = new ValueSet();
source.getCompose().addInclude().setSystem(system).addConcept().setCode(code);
ValueSetExpansionOutcome expansion;
try {
expansion = expander.expand(source);
} catch (Exception e) {
throw new InternalErrorException(e);
}
List<ValueSetExpansionContainsComponent> contains = expansion.getValueset().getExpansion().getContains();
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult result = lookup(contains, system, code);
if (result != null) {
return result;
}
} else {
/*
* If it's not a built-in code system, use ones from the database
*/
List<IIdType> valueSetIds = findValueSetIdsContainingSystemAndCode(code, system);
for (IIdType nextId : valueSetIds) {
ValueSet expansion = read(nextId, theRequestDetails);
for (ConceptDefinitionComponent next : expansion.getCodeSystem().getConcept()) {
if (code.equals(next.getCode())) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult retVal = new LookupCodeResult();
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
retVal.setFound(true);
if (next.getAbstractElement().getValue() != null) {
retVal.setCodeIsAbstract(next.getAbstractElement().booleanValue());
}
retVal.setCodeDisplay(next.getDisplay());
retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement
return retVal;
}
}
}
}
// We didn't find it..
LookupCodeResult retVal = new LookupCodeResult();
retVal.setFound(false);
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
return retVal;
}
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult lookup(List<ValueSetExpansionContainsComponent> theContains, String theSystem, String theCode) {
for (ValueSetExpansionContainsComponent nextCode : theContains) {
String system = nextCode.getSystem();
String code = nextCode.getCode();
if (theSystem.equals(system) && theCode.equals(code)) {
ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult retVal = new LookupCodeResult();
retVal.setSearchedForCode(code);
retVal.setSearchedForSystem(system);
retVal.setFound(true);
if (nextCode.getAbstractElement().getValue() != null) {
retVal.setCodeIsAbstract(nextCode.getAbstractElement().booleanValue());
}
retVal.setCodeDisplay(nextCode.getDisplay());
retVal.setCodeSystemVersion(nextCode.getVersion());
retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement
return retVal;
}
}
return null;
}
}

View File

@ -1,5 +1,6 @@
package ca.uhn.fhir.jpa.dao.dstu3;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.StructureDefinition;
@ -54,6 +55,10 @@ public class JpaValidationSupportDstu3 implements IJpaValidationSupportDstu3 {
@Qualifier("myQuestionnaireDaoDstu3")
private IFhirResourceDao<Questionnaire> myQuestionnaireDao;
@Autowired
@Qualifier("myCodeSystemDaoDstu3")
private IFhirResourceDao<CodeSystem> myCodeSystemDao;
@Autowired
@Qualifier("myFhirContextDstu3")
private FhirContext myDstu3Ctx;
@ -69,8 +74,8 @@ public class JpaValidationSupportDstu3 implements IJpaValidationSupportDstu3 {
}
@Override
public ValueSet fetchCodeSystem(FhirContext theCtx, String theSystem) {
return null;
public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) {
return fetchResource(theCtx, CodeSystem.class, theSystem);
}
@Override
@ -93,6 +98,8 @@ public class JpaValidationSupportDstu3 implements IJpaValidationSupportDstu3 {
search = myStructureDefinitionDao.search(StructureDefinition.SP_URL, new UriParam(theUri));
} else if ("Questionnaire".equals(resourceName)) {
search = myQuestionnaireDao.search(IAnyResource.SP_RES_ID, new StringParam(id.getIdPart()));
} else if ("CodeSystem".equals(resourceName)) {
search = myCodeSystemDao.search(CodeSystem.SP_URL, new UriParam(theUri));
} else {
throw new IllegalArgumentException("Can't fetch resource type: " + resourceName);
}
@ -118,4 +125,10 @@ public class JpaValidationSupportDstu3 implements IJpaValidationSupportDstu3 {
return null;
}
@Override
public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) {
return fetchResource(theCtx, StructureDefinition.class, theUrl);
}
}

View File

@ -36,23 +36,23 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.hl7.fhir.dstu3.model.Address;
import org.hl7.fhir.dstu3.model.BaseDateTimeType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Conformance.ConformanceRestSecurityComponent;
import org.hl7.fhir.dstu3.model.ContactPoint;
import org.hl7.fhir.dstu3.model.Duration;
import org.hl7.fhir.dstu3.model.Enumeration;
import org.hl7.fhir.dstu3.model.HumanName;
import org.hl7.fhir.dstu3.model.Identifier;
import org.hl7.fhir.dstu3.model.IntegerType;
import org.hl7.fhir.dstu3.model.Location.LocationPositionComponent;
import org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent;
import org.hl7.fhir.dstu3.model.Period;
import org.hl7.fhir.dstu3.model.Quantity;
import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Conformance.ConformanceRestSecurityComponent;
import org.hl7.fhir.dstu3.model.Location.LocationPositionComponent;
import org.hl7.fhir.dstu3.model.Patient.PatientCommunicationComponent;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
@ -419,9 +419,9 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
HashSet<BaseResourceIndexedSearchParam> retVal = new HashSet<BaseResourceIndexedSearchParam>();
String useSystem = null;
if (theResource instanceof ValueSet) {
ValueSet vs = (ValueSet) theResource;
useSystem = vs.getCodeSystem().getSystem();
if (theResource instanceof CodeSystem) {
CodeSystem cs = (CodeSystem) theResource;
useSystem = cs.getUrl();
}
RuntimeResourceDefinition def = getContext().getResourceDefinition(theResource);
@ -444,12 +444,12 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
List<String> codes = new ArrayList<String>();
String needContactPointSystem = null;
if (nextPath.endsWith(".where(system='phone')")) {
nextPath = nextPath.substring(0, nextPath.length() - ".where(system='phone')".length());
if (nextPath.contains(".where(system='phone')")) {
nextPath = nextPath.replace(".where(system='phone')", "");
needContactPointSystem = "phone";
}
if (nextPath.endsWith(".where(system='email')")) {
nextPath = nextPath.substring(0, nextPath.length() - ".where(system='email')".length());
if (nextPath.contains(".where(system='email')")) {
nextPath = nextPath.replace(".where(system='email')", "");
needContactPointSystem = "email";
}
@ -502,7 +502,7 @@ public class SearchParamExtractorDstu3 extends BaseSearchParamExtractor implemen
if (nextValue.isEmpty()) {
continue;
}
if ("ValueSet.codeSystem.concept.code".equals(nextPath)) {
if ("CodeSystem.concept.code".equals(nextPath)) {
systems.add(useSystem);
} else {
systems.add(null);

View File

@ -24,8 +24,9 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
import javax.servlet.http.HttpServletRequest;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem.LookupCodeResult;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
@ -121,7 +122,7 @@ public class BaseJpaResourceProviderValueSetDstu2 extends JpaResourceProviderDst
startRequest(theServletRequest);
try {
IFhirResourceDaoValueSet<ValueSet, CodingDt, CodeableConceptDt> dao = (IFhirResourceDaoValueSet<ValueSet, CodingDt, CodeableConceptDt>) getDao();
IFhirResourceDaoCodeSystem<ValueSet, CodingDt, CodeableConceptDt> dao = (IFhirResourceDaoCodeSystem<ValueSet, CodingDt, CodeableConceptDt>) getDao();
LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails);
if (result.isFound()==false) {
throw new ResourceNotFoundException("Unable to find code[" + result.getSearchedForCode() + "] in system[" + result.getSearchedForSystem() + "]");

View File

@ -0,0 +1,83 @@
package ca.uhn.fhir.jpa.provider.dstu3;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2016 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import javax.servlet.http.HttpServletRequest;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Parameters;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UriType;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoCodeSystem.LookupCodeResult;
import ca.uhn.fhir.rest.annotation.Operation;
import ca.uhn.fhir.rest.annotation.OperationParam;
import ca.uhn.fhir.rest.method.RequestDetails;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
public class BaseJpaResourceProviderCodeSystemDstu3 extends JpaResourceProviderDstu3<CodeSystem> {
//@formatter:off
@SuppressWarnings("unchecked")
@Operation(name = "$lookup", idempotent = true, returnParameters= {
@OperationParam(name="name", type=StringType.class, min=1),
@OperationParam(name="version", type=StringType.class, min=0),
@OperationParam(name="display", type=StringType.class, min=1),
@OperationParam(name="abstract", type=BooleanType.class, min=1),
})
public Parameters lookup(
HttpServletRequest theServletRequest,
@OperationParam(name="code", min=0, max=1) CodeType theCode,
@OperationParam(name="system", min=0, max=1) UriType theSystem,
@OperationParam(name="coding", min=0, max=1) Coding theCoding,
RequestDetails theRequestDetails
) {
//@formatter:on
startRequest(theServletRequest);
try {
IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept> dao = (IFhirResourceDaoCodeSystem<CodeSystem, Coding, CodeableConcept>) getDao();
LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails);
if (result.isFound()==false) {
throw new ResourceNotFoundException("Unable to find code[" + result.getSearchedForCode() + "] in system[" + result.getSearchedForSystem() + "]");
}
Parameters retVal = new Parameters();
retVal.addParameter().setName("name").setValue(new StringType(result.getCodeSystemDisplayName()));
if (isNotBlank(result.getCodeSystemVersion())) {
retVal.addParameter().setName("version").setValue(new StringType(result.getCodeSystemVersion()));
}
retVal.addParameter().setName("display").setValue(new StringType(result.getCodeDisplay()));
retVal.addParameter().setName("abstract").setValue(new BooleanType(result.isCodeIsAbstract()));
return retVal;
} finally {
endRequest(theServletRequest);
}
}
}

View File

@ -35,14 +35,11 @@ import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.LookupCodeResult;
import ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult;
import ca.uhn.fhir.rest.annotation.IdParam;
import ca.uhn.fhir.rest.annotation.Operation;
import ca.uhn.fhir.rest.annotation.OperationParam;
import ca.uhn.fhir.rest.method.RequestDetails;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
public class BaseJpaResourceProviderValueSetDstu3 extends JpaResourceProviderDstu3<ValueSet> {
@ -104,44 +101,10 @@ public class BaseJpaResourceProviderValueSetDstu3 extends JpaResourceProviderDst
return theFilter != null ? theFilter.getValue() : null;
}
//@formatter:off
@Operation(name = "$lookup", idempotent = true, returnParameters= {
@OperationParam(name="name", type=StringType.class, min=1),
@OperationParam(name="version", type=StringType.class, min=0),
@OperationParam(name="display", type=StringType.class, min=1),
@OperationParam(name="abstract", type=BooleanType.class, min=1),
})
public Parameters lookup(
HttpServletRequest theServletRequest,
@OperationParam(name="code", min=0, max=1) CodeType theCode,
@OperationParam(name="system", min=0, max=1) UriType theSystem,
@OperationParam(name="coding", min=0, max=1) Coding theCoding,
RequestDetails theRequestDetails
) {
//@formatter:on
startRequest(theServletRequest);
try {
IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> dao = (IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept>) getDao();
LookupCodeResult result = dao.lookupCode(theCode, theSystem, theCoding, theRequestDetails);
if (result.isFound()==false) {
throw new ResourceNotFoundException("Unable to find code[" + result.getSearchedForCode() + "] in system[" + result.getSearchedForSystem() + "]");
}
Parameters retVal = new Parameters();
retVal.addParameter().setName("name").setValue(new StringType(result.getCodeSystemDisplayName()));
if (isNotBlank(result.getCodeSystemVersion())) {
retVal.addParameter().setName("version").setValue(new StringType(result.getCodeSystemVersion()));
}
retVal.addParameter().setName("display").setValue(new StringType(result.getCodeDisplay()));
retVal.addParameter().setName("abstract").setValue(new BooleanType(result.isCodeIsAbstract()));
return retVal;
} finally {
endRequest(theServletRequest);
}
}
//@formatter:off
@SuppressWarnings("unchecked")
@Operation(name = "$validate-code", idempotent = true, returnParameters= {
@OperationParam(name="result", type=BooleanType.class, min=1),
@OperationParam(name="message", type=StringType.class),

View File

@ -0,0 +1,15 @@
package ca.uhn.fhir.jpa.util;
public class LogicUtil {
public static boolean multiXor(boolean... theValues) {
int count = 0;
for (int i = 0; i < theValues.length; i++) {
if (theValues[i]) {
count++;
}
}
return count == 1;
}
}

View File

@ -40,6 +40,7 @@ import org.hl7.fhir.dstu3.model.Substance;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -80,15 +81,11 @@ import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor;
//@formatter:on
public abstract class BaseJpaDstu3Test extends BaseJpaTest {
@After()
public void afterFlushCaches() {
myValueSetDao.purgeCaches();
myJpaValidationSupportChainDstu3.flush();
}
private static IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> ourValueSetDao;
private static JpaValidationSupportChainDstu3 ourJpaValidationSupportChainDstu3;
@Autowired
private JpaValidationSupportChainDstu3 myJpaValidationSupportChainDstu3;
@Autowired
protected ApplicationContext myAppCtx;
@Autowired
@ -130,17 +127,17 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
@Autowired
@Qualifier("myMedicationDaoDstu3")
protected IFhirResourceDao<Medication> myMedicationDao;
@Autowired
@Qualifier("myMedicationOrderDaoDstu3")
protected IFhirResourceDao<MedicationOrder> myMedicationOrderDao;
@Autowired
@Qualifier("myMedicationOrderDaoDstu3")
protected IFhirResourceDao<MedicationOrder> myMedicationOrderDao;
@Autowired
@Qualifier("myNamingSystemDaoDstu3")
protected IFhirResourceDao<NamingSystem> myNamingSystemDao;
@Autowired
@Qualifier("myObservationDaoDstu3")
protected IFhirResourceDao<Observation> myObservationDao;
@Autowired
@Qualifier("myObservationDaoDstu3")
protected IFhirResourceDao<Observation> myObservationDao;
@Autowired
@Qualifier("myOrganizationDaoDstu3")
protected IFhirResourceDao<Organization> myOrganizationDao;
@ -190,7 +187,11 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
@Autowired
@Qualifier("myValueSetDaoDstu3")
protected IFhirResourceDaoValueSet<ValueSet, Coding, CodeableConcept> myValueSetDao;
@After()
public void afterGrabCaches() {
ourValueSetDao = myValueSetDao;
ourJpaValidationSupportChainDstu3 = myJpaValidationSupportChainDstu3;
}
@Before
public void beforeCreateInterceptor() {
myInterceptor = mock(IServerInterceptor.class);
@ -215,7 +216,6 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
purgeDatabase(entityManager, myTxManager);
}
@Before
public void beforeResetConfig() {
myDaoConfig.setHardSearchLimit(1000);
@ -223,6 +223,7 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
myDaoConfig.setIncludeLimit(2000);
}
protected <T extends IBaseResource> T loadResourceFromClasspath(Class<T> type, String resourceName) throws IOException {
InputStream stream = FhirResourceDaoDstu2SearchNoFtTest.class.getResourceAsStream(resourceName);
if (stream == null) {
@ -240,4 +241,10 @@ public abstract class BaseJpaDstu3Test extends BaseJpaTest {
return retVal;
}
@AfterClass
public static void afterFlushCaches() {
ourValueSetDao.purgeCaches();
ourJpaValidationSupportChainDstu3.flush();
}
}

View File

@ -46,7 +46,7 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test {
obs1.getCode().setText("Systolic Blood Pressure");
obs1.setStatus(ObservationStatus.FINAL);
obs1.setValue(new Quantity(123));
obs1.setComments("obs1");
obs1.setComment("obs1");
IIdType id1 = myObservationDao.create(obs1, mySrd).getId().toUnqualifiedVersionless();
Observation obs2 = new Observation();

View File

@ -211,11 +211,11 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
public void testIndexNoDuplicatesReference() {
Practitioner pract =new Practitioner();
pract.setId("Practitioner/somepract");
pract.getName().addFamily("SOME PRACT");
pract.addName().addFamily("SOME PRACT");
myPractitionerDao.update(pract, mySrd);
Practitioner pract2 =new Practitioner();
pract2.setId("Practitioner/somepract2");
pract2.getName().addFamily("SOME PRACT2");
pract2.addName().addFamily("SOME PRACT2");
myPractitionerDao.update(pract2, mySrd);
DiagnosticOrder res = new DiagnosticOrder();
@ -948,14 +948,14 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
IIdType id1;
{
Practitioner patient = new Practitioner();
patient.getName().addFamily(methodName);
patient.addName().addFamily(methodName);
patient.addTelecom().setSystem(ContactPointSystem.PHONE).setValue("123");
id1 = myPractitionerDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
}
IIdType id2;
{
Practitioner patient = new Practitioner();
patient.getName().addFamily(methodName);
patient.addName().addFamily(methodName);
patient.addTelecom().setSystem(ContactPointSystem.EMAIL).setValue("abc");
id2 = myPractitionerDao.create(patient, mySrd).getId().toUnqualifiedVersionless();
}

View File

@ -245,7 +245,11 @@ public class FhirResourceDaoDstu3ValidateTest extends BaseJpaDstu3Test {
return retVal;
}
/**
* Format has changed, this is out of date
*/
@Test
@Ignore
public void testValidateNewQuestionnaireFormat() throws Exception {
String input =IOUtils.toString(FhirResourceDaoDstu3ValidateTest.class.getResourceAsStream("/questionnaire_dstu3.xml"));
try {

View File

@ -10,6 +10,7 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
@ -36,9 +37,12 @@ public class FhirResourceDaoValueSetDstu3Test extends BaseJpaDstu3Test {
@Before
@Transactional
public void before02() throws IOException {
ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-2.1.xml");
upload.setId("");
ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml");
myExtensionalVsId = myValueSetDao.create(upload, mySrd).getId().toUnqualifiedVersionless();
CodeSystem upload2 = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs.xml");
myCodeSystemDao.create(upload2, mySrd).getId().toUnqualifiedVersionless();
}
@Test
@ -196,7 +200,7 @@ public class FhirResourceDaoValueSetDstu3Test extends BaseJpaDstu3Test {
@Test
public void testExpandByValueSet() throws IOException {
ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-2.xml");
ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml");
ValueSet expanded = myValueSetDao.expand(toExpand, "11378");
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded);
ourLog.info(resp);

View File

@ -43,6 +43,7 @@ import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.springframework.transaction.TransactionDefinition;
@ -64,7 +65,6 @@ import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException;
import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
@ -1004,7 +1004,11 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
assertEquals("Patient/temp6789", p.getLink().get(0).getOther().getReference());
}
/**
* Format changed, source isn't valid
*/
@Test
@Ignore
public void testTransactionWithBundledValidationSourceAndTarget() throws Exception {
InputStream bundleRes = SystemProviderDstu2Test.class.getResourceAsStream("/questionnaire-sdc-profile-example-ussg-fht.xml");

View File

@ -0,0 +1,227 @@
package ca.uhn.fhir.jpa.provider.dstu3;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.stringContainsInOrder;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import java.io.IOException;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Parameters;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.instance.model.api.IIdType;
import org.junit.Before;
import org.junit.Test;
import org.springframework.transaction.annotation.Transactional;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
public class ResourceProviderDstu3CodeSystemTest extends BaseResourceProviderDstu3Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderDstu3CodeSystemTest.class);
private IIdType myExtensionalVsId;
@Before
@Transactional
public void before02() throws IOException {
CodeSystem cs = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs.xml");
myCodeSystemDao.create(cs, mySrd);
ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml");
myExtensionalVsId = myValueSetDao.create(upload, mySrd).getId().toUnqualifiedVersionless();
}
@Test
public void testLookupOperationByCodeAndSystemBuiltInCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("ACSN"))
.andParameter("system", new UriType("http://hl7.org/fhir/v2/0203"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals("Accession ID", ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByCodeAndSystemBuiltInNonexistantCode() {
//@formatter:off
try {
ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("ACSNAAAAAA"))
.andParameter("system", new UriType("http://hl7.org/fhir/v2/0203"))
.execute();
fail();
} catch (ResourceNotFoundException e) {
// good
}
//@formatter:on
}
@Test
public void testLookupOperationByCodeAndSystemUserDefinedCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals(("Systolic blood pressure--expiration"), ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByCodeAndSystemUserDefinedNonExistantCode() {
//@formatter:off
try {
ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("8450-9AAAAA"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (ResourceNotFoundException e) {
// good
}
//@formatter:on
}
@Test
public void testLookupOperationByCoding() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals(("Systolic blood pressure--expiration"), ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByInvalidCombination() {
//@formatter:off
try {
ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.andParameter("code", new CodeType("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: $lookup can only validate (system AND code) OR (coding.system AND coding.code)", e.getMessage());
}
//@formatter:on
}
@Test
public void testLookupOperationByInvalidCombination2() {
//@formatter:off
try {
ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: $lookup can only validate (system AND code) OR (coding.system AND coding.code)", e.getMessage());
}
//@formatter:on
}
@Test
public void testLookupOperationByInvalidCombination3() {
//@formatter:off
try {
ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode(null))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: No code, coding, or codeableConcept provided to validate", e.getMessage());
}
//@formatter:on
}
@Test
// @Ignore
public void testLookupOperationForBuiltInCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(CodeSystem.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("M"))
.andParameter("system", new UriType("http://hl7.org/fhir/v3/MaritalStatus"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals("Unknown", ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals("Married", ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).booleanValue());
}
}

View File

@ -44,6 +44,7 @@ import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
import org.hl7.fhir.dstu3.model.Bundle.BundleType;
import org.hl7.fhir.dstu3.model.Bundle.HTTPVerb;
import org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Condition;
import org.hl7.fhir.dstu3.model.DateTimeType;
@ -142,7 +143,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
public void testBundleCreate() throws Exception {
IGenericClient client = ourClient;
String resBody = IOUtils.toString(ResourceProviderDstu3Test.class.getResource("/document-father.json"));
String resBody = IOUtils.toString(ResourceProviderDstu3Test.class.getResource("/document-father-dstu3.json"));
IIdType id = client.create().resource(resBody).execute().getId();
ourLog.info("Created: {}", id);
@ -156,7 +157,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
public void testBundleCreateWithTypeTransaction() throws Exception {
IGenericClient client = ourClient;
String resBody = IOUtils.toString(ResourceProviderDstu3Test.class.getResource("/document-father.json"));
String resBody = IOUtils.toString(ResourceProviderDstu3Test.class.getResource("/document-father-dstu3.json"));
resBody = resBody.replace("\"type\": \"document\"", "\"type\": \"transaction\"");
try {
client.create().resource(resBody).execute().getId();
@ -282,8 +283,13 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
@Test
@Ignore
public void testCreateQuestionnaireResponseWithValidation() throws IOException {
CodeSystem cs = new CodeSystem();
cs.setUrl("http://urn/system");
cs.addConcept().setCode("code0");
ourClient.create().resource(cs).execute();
ValueSet options = new ValueSet();
options.getCodeSystem().setSystem("urn:system").addConcept().setCode("code0");
options.getCompose().addInclude().setSystem("http://urn/system");
IIdType optId = ourClient.create().resource(options).execute().getId();
Questionnaire q = new Questionnaire();
@ -2607,8 +2613,10 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
@Test
public void testValueSetExpandOperation() throws IOException {
CodeSystem cs = myFhirCtx.newXmlParser().parseResource(CodeSystem.class, new InputStreamReader(ResourceProviderDstu3Test.class.getResourceAsStream("/extensional-case-3-cs.xml")));
ourClient.create().resource(cs).execute();
ValueSet upload = myFhirCtx.newXmlParser().parseResource(ValueSet.class, new InputStreamReader(ResourceProviderDstu3Test.class.getResourceAsStream("/extensional-case-2.1.xml")));
ValueSet upload = myFhirCtx.newXmlParser().parseResource(ValueSet.class, new InputStreamReader(ResourceProviderDstu3Test.class.getResourceAsStream("/extensional-case-3-vs.xml")));
IIdType vsid = ourClient.create().resource(upload).execute().getId().toUnqualifiedVersionless();
HttpGet get = new HttpGet(ourServerBase + "/ValueSet/" + vsid.getIdPart() + "/$expand");

View File

@ -10,6 +10,7 @@ import static org.junit.Assert.fail;
import java.io.IOException;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.Parameters;
@ -23,7 +24,6 @@ import org.springframework.transaction.annotation.Transactional;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3Test {
@ -33,8 +33,10 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3
@Before
@Transactional
public void before02() throws IOException {
ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-2.1.xml");
upload.setId("");
CodeSystem cs = loadResourceFromClasspath(CodeSystem.class, "/extensional-case-3-cs.xml");
myCodeSystemDao.create(cs, mySrd);
ValueSet upload = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml");
myExtensionalVsId = myValueSetDao.create(upload, mySrd).getId().toUnqualifiedVersionless();
}
@ -121,7 +123,7 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3
@Test
public void testExpandByValueSet() throws IOException {
ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-2.xml");
ValueSet toExpand = loadResourceFromClasspath(ValueSet.class, "/extensional-case-3-vs.xml");
//@formatter:off
Parameters respParam = ourClient
@ -195,187 +197,6 @@ public class ResourceProviderDstu3ValueSetTest extends BaseResourceProviderDstu3
}
@Test
public void testLookupOperationByCodeAndSystemBuiltInCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("ACSN"))
.andParameter("system", new UriType("http://hl7.org/fhir/v2/0203"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals("Accession ID", ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByCodeAndSystemBuiltInNonexistantCode() {
//@formatter:off
try {
ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("ACSNAAAAAA"))
.andParameter("system", new UriType("http://hl7.org/fhir/v2/0203"))
.execute();
fail();
} catch (ResourceNotFoundException e) {
// good
}
//@formatter:on
}
@Test
public void testLookupOperationByCodeAndSystemUserDefinedCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals(("Systolic blood pressure--expiration"), ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByCodeAndSystemUserDefinedNonExistantCode() {
//@formatter:off
try {
ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("8450-9AAAAA"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (ResourceNotFoundException e) {
// good
}
//@formatter:on
}
@Test
public void testLookupOperationByCoding() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals(("Unknown"), ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals(("Systolic blood pressure--expiration"), ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).getValue().booleanValue());
}
@Test
public void testLookupOperationByInvalidCombination() {
//@formatter:off
try {
ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.andParameter("code", new CodeType("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: $lookup can only validate (system AND code) OR (coding.system AND coding.code)", e.getMessage());
}
//@formatter:on
}
@Test
public void testLookupOperationByInvalidCombination2() {
//@formatter:off
try {
ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode("8450-9"))
.andParameter("system", new UriType("http://acme.org"))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: $lookup can only validate (system AND code) OR (coding.system AND coding.code)", e.getMessage());
}
//@formatter:on
}
@Test
public void testLookupOperationByInvalidCombination3() {
//@formatter:off
try {
ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "coding", new Coding().setSystem("http://acme.org").setCode(null))
.execute();
fail();
} catch (InvalidRequestException e) {
assertEquals("HTTP 400 Bad Request: No code, coding, or codeableConcept provided to validate", e.getMessage());
}
//@formatter:on
}
@Test
// @Ignore
public void testLookupOperationForBuiltInCode() {
//@formatter:off
Parameters respParam = ourClient
.operation()
.onType(ValueSet.class)
.named("lookup")
.withParameter(Parameters.class, "code", new CodeType("M"))
.andParameter("system", new UriType("http://hl7.org/fhir/v3/MaritalStatus"))
.execute();
//@formatter:on
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(respParam);
ourLog.info(resp);
assertEquals("name", respParam.getParameter().get(0).getName());
assertEquals("Unknown", ((StringType)respParam.getParameter().get(0).getValue()).getValue());
assertEquals("display", respParam.getParameter().get(1).getName());
assertEquals("Married", ((StringType)respParam.getParameter().get(1).getValue()).getValue());
assertEquals("abstract", respParam.getParameter().get(2).getName());
assertEquals(false, ((BooleanType)respParam.getParameter().get(2).getValue()).booleanValue());
}
@Test
public void testValidateCodeOperationByCodeAndSystemInstance() {

View File

@ -42,6 +42,7 @@ import org.hl7.fhir.instance.model.api.IIdType;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -61,7 +62,6 @@ import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.validation.ResultSeverityEnum;
public class SystemProviderDstu3Test extends BaseJpaDstu3Test {
@ -144,8 +144,11 @@ public class SystemProviderDstu3Test extends BaseJpaDstu3Test {
}
/**
* FOrmat has changed, source is no longer valid
*/
@Test
@Ignore
public void testValidateUsingIncomingResources() throws Exception {
FhirInstanceValidator val = new FhirInstanceValidator(myValidationSupport);
RequestValidatingInterceptor interceptor = new RequestValidatingInterceptor();

View File

@ -0,0 +1,475 @@
{
"resourceType": "Bundle",
"meta": {
"lastUpdated": "2013-05-28T22:12:21Z",
"tag": [
{
"system": "http://hl7.org/fhir/tag",
"code": "document"
}
]
},
"type": "document",
"base": "http://fhir.healthintersections.com.au/open",
"entry": [
{
"base": "urn:uuid:",
"resource": {
"resourceType": "Composition",
"id": "180f219f-97a8-486d-99d9-ed631fe4fc57",
"meta": {
"lastUpdated": "2013-05-28T22:12:21Z"
},
"text": {
"status": "generated",
"div": "<div><p><b>Generated Narrative with Details</b></p><p><b>id</b>: 180f219f-97a8-486d-99d9-ed631fe4fc57</p><p><b>meta</b>: </p><p><b>date</b>: Feb 1, 2013 12:30:02 PM</p><p><b>type</b>: Discharge Summary from Responsible Clinician <span>(Details : {LOINC code '28655-9' = 'Physician attending Discharge summary)</span></p><p><b>status</b>: final</p><p><b>confidentiality</b>: N</p><p><b>author</b>: <a>Doctor Dave. Generated Summary: 23; Adam Careful </a></p><p><b>encounter</b>: <a>http://fhir.healthintersections.com.au/open/Encounter/doc-example</a></p></div>"
},
"date": "2013-02-01T12:30:02Z",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "28655-9"
}
],
"text": "Discharge Summary from Responsible Clinician"
},
"status": "final",
"confidentiality": "N",
"subject": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Eve Everywoman"
},
"author": [
{
"reference": "Practitioner/example",
"display": "Doctor Dave"
}
],
"encounter": {
"reference": "http://fhir.healthintersections.com.au/open/Encounter/doc-example"
},
"section": [
{
"title": "Reason for admission",
"content": {
"reference": "urn:uuid:d0dd51d3-3ab2-4c84-b697-a630c3e40e7a"
}
},
{
"title": "Medications on Discharge",
"content": {
"reference": "urn:uuid:673f8db5-0ffd-4395-9657-6da00420bbc1"
}
},
{
"title": "Known allergies",
"content": {
"reference": "urn:uuid:68f86194-e6e1-4f65-b64a-5314256f8d7b"
}
}
]
}
},
{
"resource": {
"resourceType": "Practitioner",
"id": "example",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "generated",
"div": "<div>\n \n <p>Dr Adam Careful is a Referring Practitioner for Acme Hospital from 1-Jan 2012 to 31-Mar\n 2012</p>\n \n </div>"
},
"identifier": [
{
"system": "http://www.acme.org/practitioners",
"value": "23"
}
],
"name": {
"family": [
"Careful"
],
"given": [
"Adam"
],
"prefix": [
"Dr"
]
},
"practitionerRole": [
{
"managingOrganization": {
"reference": "Organization/1"
},
"role": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0286",
"code": "RP"
}
]
},
"period": {
"start": "2012-01-01",
"end": "2012-03-31"
}
}
]
}
},
{
"resource": {
"resourceType": "Patient",
"id": "d1",
"text": {
"status": "generated",
"div": "<div>\n <h1>Eve Everywoman</h1>\n </div>"
},
"name": [
{
"text": "Eve Everywoman",
"family": [
"Everywoman1"
],
"given": [
"Eve"
]
}
],
"telecom": [
{
"system": "phone",
"value": "555-555-2003",
"use": "work"
}
],
"gender": "female",
"birthDate": "1955-01-06",
"address": [
{
"use": "home",
"line": [
"2222 Home Street"
]
}
],
"active": true
}
},
{
"resource": {
"resourceType": "Encounter",
"id": "doc-example",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "generated",
"div": "<div> Admitted to Orthopedics Service,\n Middlemore Hospital between Jan 20 and Feb ist 2013 </div>"
},
"identifier": [
{
"value": "S100"
}
],
"status": "finished",
"class": "inpatient",
"type": [
{
"text": "Orthopedic Admission"
}
],
"patient": {
"reference": "Patient/d1"
},
"period": {
"start": "2013-01-20T12:30:02Z",
"end": "2013-02-01T12:30:02Z"
},
"hospitalization": {
"dischargeDisposition": {
"text": "Discharged to care of GP"
}
}
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "List",
"id": "d0dd51d3-3ab2-4c84-b697-a630c3e40e7a",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "additional",
"div": "<div>\n <table>\n <thead>\n <tr>\n <td>Details</td>\n <td/>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Acute Asthmatic attack. Was wheezing\n for days prior to admission.</td>\n <td/>\n </tr>\n </tbody>\n </table>\n </div>"
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8646-2",
"display": "Hospital admission diagnosis"
}
]
},
"subject": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Peter Patient"
},
"status": "current",
"mode": "working",
"entry": [
{
"item": {
"reference": "urn:uuid:541a72a8-df75-4484-ac89-ac4923f03b81"
}
}
]
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "Observation",
"id": "541a72a8-df75-4484-ac89-ac4923f03b81",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "additional",
"div": "<div> Acute Asthmatic attack. Was wheezing\n for days prior to admission. </div>"
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "46241-6"
}
],
"text": "Reason for admission"
},
"valueString": "Acute Asthmatic attack. Was wheezing for days prior to admission.",
"status": "final",
"reliability": "ok"
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "List",
"id": "673f8db5-0ffd-4395-9657-6da00420bbc1",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "additional",
"div": "<div>\n <table>\n <thead>\n <tr>\n <td>Medication</td>\n <td>Last Change</td>\n <td>Last ChangeReason</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Theophylline 200mg BD after meals</td>\n <td>continued</td>\n </tr>\n <tr>\n <td>Ventolin Inhaler</td>\n <td>stopped</td>\n <td>Getting side effect of tremor</td>\n </tr>\n </tbody>\n </table>\n </div>"
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10183-2",
"display": "Hospital discharge medications"
}
]
},
"subject": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Peter Patient"
},
"status": "current",
"mode": "working",
"entry": [
{
"flag": [
{
"coding": [
{
"system": "http://www.ithealthboard.health.nz/fhir/ValueSet/medicationStatus",
"code": "started"
}
]
}
],
"item": {
"reference": "urn:uuid:124a6916-5d84-4b8c-b250-10cefb8e6e86"
}
},
{
"flag": [
{
"coding": [
{
"system": "http://www.ithealthboard.health.nz/fhir/ValueSet/medicationStatus",
"code": "stopped"
}
]
}
],
"deleted": true,
"item": {
"reference": "MedicationOrder/1",
"display": "use of Ventolin Inhaler was discontinued"
}
}
]
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "MedicationOrder",
"id": "124a6916-5d84-4b8c-b250-10cefb8e6e86",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "generated",
"div": "<div>\n <p>Theophylline 200mg twice a day</p>\n </div>"
},
"contained": [
{
"resourceType": "Medication",
"id": "med1",
"name": "Theophylline 200mg",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "66493003"
}
]
}
}
],
"patient": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Peter Patient"
},
"prescriber": {
"reference": "Practitioner/example",
"display": "Peter Practitioner"
},
"reasonCodeableConcept": {
"text": "Management of Asthma"
},
"medicationReference": {
"reference": "#med1",
"display": "Theophylline 200mg BD"
},
"dosageInstruction": [
{
"additionalInstructions": {
"text": "Take with Food"
},
"scheduledTiming": {
"repeat": {
"frequency": 2,
"period": 1,
"periodUnits": "d"
}
},
"route": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "394899003",
"display": "oral administration of treatment"
}
]
},
"doseQuantity": {
"value": 1,
"units": "tablet",
"system": "http://unitsofmeasure.org",
"code": "tbl"
}
}
]
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "List",
"id": "68f86194-e6e1-4f65-b64a-5314256f8d7b",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "additional",
"div": "<div>\n <table>\n <thead>\n <tr>\n <td>Allergen</td>\n <td>Reaction</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Doxycycline</td>\n <td>Hives</td>\n </tr>\n </tbody>\n </table>\n </div>"
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "48765-2",
"display": "Allergies and adverse reactions Document"
}
]
},
"subject": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Peter Patient"
},
"status": "current",
"mode": "working",
"entry": [
{
"item": {
"reference": "urn:uuid:47600e0f-b6b5-4308-84b5-5dec157f7637"
}
}
]
}
},
{
"base": "urn:uuid:",
"resource": {
"resourceType": "AllergyIntolerance",
"id": "47600e0f-b6b5-4308-84b5-5dec157f7637",
"meta": {
"lastUpdated": "2013-05-05T16:13:03Z"
},
"text": {
"status": "generated",
"div": "<div>Sensitivity to Doxycycline :\n Hives</div>"
},
"recordedDate": "2012-09-17",
"patient": {
"reference": "http://fhir.healthintersections.com.au/open/Patient/d1",
"display": "Eve Everywoman"
},
"substance": {
"text": "Doxycycline"
},
"status": "confirmed",
"criticality": "high",
"type": "allergy",
"event": [
{
"manifestation": [
{
"coding": [
{
"system": "http://example.org/system",
"code": "xxx",
"display": "Hives"
}
],
"text": "Hives"
}
]
}
]
}
}
]
}

View File

@ -1,121 +0,0 @@
<ValueSet xmlns="http://hl7.org/fhir">
<id value="extensional-case-2" />
<text>
<status value="generated" />
<div xmlns="http://www.w3.org/1999/xhtml">A selection of codes from http://acme.org</div>
</text>
<url value="http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2" />
<identifier>
<value value="http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2" />
</identifier>
<name value="Terminology Services Connectation #1 Extensional case #2" />
<publisher value="Grahame Grieve" />
<contact>
<telecom>
<system value="email" />
<value value="grahame@healthintersections.com.au" />
</telecom>
</contact>
<description value="an enumeration of codes defined by LOINC" />
<status value="draft" />
<experimental value="true" />
<codeSystem>
<system value="http://acme.org" />
<concept>
<code value="8450-9" />
<display value="Systolic blood pressure--expiration" />
</concept>
<concept>
<code value="11378-7" />
<display value="Systolic blood pressure at First encounter" />
</concept>
<concept>
<code value="8493-9" />
<display value="Systolic blood pressure 10 hour minimum" />
</concept>
<concept>
<code value="8494-7" />
<display value="Systolic blood pressure 12 hour minimum" />
</concept>
<concept>
<code value="8495-4" />
<display value="Systolic blood pressure 24 hour minimum" />
</concept>
<concept>
<code value="8451-7" />
<display value="Systolic blood pressure--inspiration" />
</concept>
<concept>
<code value="8452-5" />
<display value="Systolic blood pressure.inspiration - expiration" />
</concept>
<concept>
<code value="8459-0" />
<display value="Systolic blood pressure--sitting" />
</concept>
<concept>
<code value="8460-8" />
<display value="Systolic blood pressure--standing" />
</concept>
<concept>
<code value="8461-6" />
<display value="Systolic blood pressure--supine" />
</concept>
<concept>
<code value="8479-8" />
<display value="Systolic blood pressure by palpation" />
</concept>
<concept>
<code value="8480-6" />
<display value="Systolic blood pressure" />
</concept>
<concept>
<code value="8481-4" />
<display value="Systolic blood pressure 1 hour maximum" />
</concept>
<concept>
<code value="8482-2" />
<display value="Systolic blood pressure 8 hour maximum" />
</concept>
<concept>
<code value="8483-0" />
<display value="Systolic blood pressure 10 hour maximum" />
</concept>
<concept>
<code value="8484-8" />
<display value="Systolic blood pressure 12 hour maximum" />
</concept>
<concept>
<code value="8485-5" />
<display value="Systolic blood pressure 24 hour maximum" />
</concept>
<concept>
<code value="8486-3" />
<display value="Systolic blood pressure 1 hour mean" />
</concept>
<concept>
<code value="8487-1" />
<display value="Systolic blood pressure 8 hour mean" />
</concept>
<concept>
<code value="8488-9" />
<display value="Systolic blood pressure 10 hour mean" />
</concept>
<concept>
<code value="8489-7" />
<display value="Systolic blood pressure 12 hour mean" />
</concept>
<concept>
<code value="8490-5" />
<display value="Systolic blood pressure 24 hour mean" />
</concept>
<concept>
<code value="8491-3" />
<display value="Systolic blood pressure 1 hour minimum" />
</concept>
<concept>
<code value="8492-1" />
<display value="Systolic blood pressure 8 hour minimum" />
</concept>
</codeSystem>
</ValueSet>

View File

@ -0,0 +1,99 @@
<CodeSystem xmlns="http://hl7.org/fhir">
<url value="http://acme.org" />
<concept>
<code value="8450-9" />
<display value="Systolic blood pressure--expiration" />
</concept>
<concept>
<code value="11378-7" />
<display value="Systolic blood pressure at First encounter" />
</concept>
<concept>
<code value="8493-9" />
<display value="Systolic blood pressure 10 hour minimum" />
</concept>
<concept>
<code value="8494-7" />
<display value="Systolic blood pressure 12 hour minimum" />
</concept>
<concept>
<code value="8495-4" />
<display value="Systolic blood pressure 24 hour minimum" />
</concept>
<concept>
<code value="8451-7" />
<display value="Systolic blood pressure--inspiration" />
</concept>
<concept>
<code value="8452-5" />
<display value="Systolic blood pressure.inspiration - expiration" />
</concept>
<concept>
<code value="8459-0" />
<display value="Systolic blood pressure--sitting" />
</concept>
<concept>
<code value="8460-8" />
<display value="Systolic blood pressure--standing" />
</concept>
<concept>
<code value="8461-6" />
<display value="Systolic blood pressure--supine" />
</concept>
<concept>
<code value="8479-8" />
<display value="Systolic blood pressure by palpation" />
</concept>
<concept>
<code value="8480-6" />
<display value="Systolic blood pressure" />
</concept>
<concept>
<code value="8481-4" />
<display value="Systolic blood pressure 1 hour maximum" />
</concept>
<concept>
<code value="8482-2" />
<display value="Systolic blood pressure 8 hour maximum" />
</concept>
<concept>
<code value="8483-0" />
<display value="Systolic blood pressure 10 hour maximum" />
</concept>
<concept>
<code value="8484-8" />
<display value="Systolic blood pressure 12 hour maximum" />
</concept>
<concept>
<code value="8485-5" />
<display value="Systolic blood pressure 24 hour maximum" />
</concept>
<concept>
<code value="8486-3" />
<display value="Systolic blood pressure 1 hour mean" />
</concept>
<concept>
<code value="8487-1" />
<display value="Systolic blood pressure 8 hour mean" />
</concept>
<concept>
<code value="8488-9" />
<display value="Systolic blood pressure 10 hour mean" />
</concept>
<concept>
<code value="8489-7" />
<display value="Systolic blood pressure 12 hour mean" />
</concept>
<concept>
<code value="8490-5" />
<display value="Systolic blood pressure 24 hour mean" />
</concept>
<concept>
<code value="8491-3" />
<display value="Systolic blood pressure 1 hour minimum" />
</concept>
<concept>
<code value="8492-1" />
<display value="Systolic blood pressure 8 hour minimum" />
</concept>
</CodeSystem>

View File

@ -0,0 +1,22 @@
<ValueSet xmlns="http://hl7.org/fhir">
<url value="http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2" />
<identifier>
<value value="http://www.healthintersections.com.au/fhir/ValueSet/extensional-case-2" />
</identifier>
<name value="Terminology Services Connectation #1 Extensional case #2" />
<publisher value="Grahame Grieve" />
<contact>
<telecom>
<system value="email" />
<value value="grahame@healthintersections.com.au" />
</telecom>
</contact>
<description value="an enumeration of codes defined by LOINC" />
<status value="draft" />
<experimental value="true" />
<compose>
<include>
<system value="http://acme.org"/>
</include>
</compose>
</ValueSet>

View File

@ -198,6 +198,7 @@ public class ServerConformanceProvider implements IServerConformanceProvider<Con
retVal.getSoftware().setVersion(myServerConfiguration.getServerVersion());
retVal.addFormat(Constants.CT_FHIR_XML);
retVal.addFormat(Constants.CT_FHIR_JSON);
retVal.setStatus(ConformanceResourceStatus.ACTIVE);
ConformanceRestComponent rest = retVal.addRest();
rest.setMode(RestfulConformanceMode.SERVER);

View File

@ -4,135 +4,180 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.commons.io.Charsets;
import org.hl7.fhir.dstu3.model.Bundle;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.DomainResource;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
public class DefaultProfileValidationSupport implements IValidationSupport {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DefaultProfileValidationSupport.class);
private Map<String, ValueSet> myCodeSystems;
private Map<String, ValueSet> myDefaultValueSets;
private Map<String, CodeSystem> myCodeSystems;
private Map<String, StructureDefinition> myStructureDefinitions;
private Map<String, ValueSet> myValueSets;
@Override
public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) {
ValueSetExpansionComponent retVal = new ValueSetExpansionComponent();
Set<String> wantCodes = new HashSet<String>();
for (ConceptReferenceComponent next : theInclude.getConcept()) {
wantCodes.add(next.getCode());
}
ValueSet system = fetchCodeSystem(theContext, theInclude.getSystem());
for (ConceptDefinitionComponent next : system.getCodeSystem().getConcept()) {
CodeSystem system = fetchCodeSystem(theContext, theInclude.getSystem());
for (ConceptDefinitionComponent next : system.getConcept()) {
if (wantCodes.isEmpty() || wantCodes.contains(next.getCode())) {
retVal.addContains().setSystem(theInclude.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay());
}
}
return retVal;
}
@Override
public ValueSet fetchCodeSystem(FhirContext theContext, String theSystem) {
Map<String, ValueSet> codeSystems = myCodeSystems;
if (codeSystems == null) {
codeSystems = new HashMap<String, ValueSet>();
public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) {
return (CodeSystem) fetchCodeSystemOrValueSet(theContext, theSystem, true);
}
loadCodeSystems(theContext, codeSystems, "/org/hl7/fhir/instance/model/dstu3/valueset/valuesets.xml");
loadCodeSystems(theContext, codeSystems, "/org/hl7/fhir/instance/model/dstu3/valueset/v2-tables.xml");
loadCodeSystems(theContext, codeSystems, "/org/hl7/fhir/instance/model/dstu3/valueset/v3-codesystems.xml");
ValueSet fetchValueSet(FhirContext theContext, String theSystem) {
return (ValueSet) fetchCodeSystemOrValueSet(theContext, theSystem, false);
}
private DomainResource fetchCodeSystemOrValueSet(FhirContext theContext, String theSystem, boolean codeSystem) {
Map<String, CodeSystem> codeSystems = myCodeSystems;
Map<String, ValueSet> valueSets = myValueSets;
if (codeSystems == null) {
codeSystems = new HashMap<String, CodeSystem>();
valueSets = new HashMap<String, ValueSet>();
loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/instance/model/dstu3/valueset/valuesets.xml");
loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/instance/model/dstu3/valueset/v2-tables.xml");
loadCodeSystems(theContext, codeSystems, valueSets, "/org/hl7/fhir/instance/model/dstu3/valueset/v3-codesystems.xml");
myCodeSystems = codeSystems;
myValueSets = valueSets;
}
return codeSystems.get(theSystem);
if (codeSystem) {
return codeSystems.get(theSystem);
} else {
return valueSets.get(theSystem);
}
}
@SuppressWarnings("unchecked")
@Override
public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) {
if (theUri.startsWith("http://hl7.org/fhir/StructureDefinition/")) {
return (T) FhirInstanceValidator.loadProfileOrReturnNull(null, theContext, theUri.substring("http://hl7.org/fhir/StructureDefinition/".length()));
return (T) fetchStructureDefinition(theContext, theUri);
}
if (theUri.startsWith("http://hl7.org/fhir/ValueSet/")) {
Map<String, ValueSet> defaultValueSets = myDefaultValueSets;
if (defaultValueSets == null) {
String path = theContext.getVersion().getPathToSchemaDefinitions().replace("/schema", "/valueset") + "/valuesets.xml";
InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(path);
if (valuesetText == null) {
return null;
}
InputStreamReader reader;
try {
reader = new InputStreamReader(valuesetText, "UTF-8");
} catch (UnsupportedEncodingException e) {
// Shouldn't happen!
throw new InternalErrorException("UTF-8 encoding not supported on this platform", e);
}
defaultValueSets = new HashMap<String, ValueSet>();
Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader);
for (BundleEntryComponent next : bundle.getEntry()) {
IdType nextId = new IdType(next.getFullUrl());
if (nextId.isEmpty() || !nextId.getValue().startsWith("http://hl7.org/fhir/ValueSet/")) {
continue;
}
defaultValueSets.put(nextId.toVersionless().getValue(), (ValueSet) next.getResource());
}
myDefaultValueSets = defaultValueSets;
}
return (T) defaultValueSets.get(theUri);
return (T) fetchValueSet(theContext, theUri);
}
// if (theUri.startsWith("http://hl7.org/fhir/ValueSet/")) {
// Map<String, ValueSet> defaultValueSets = myDefaultValueSets;
// if (defaultValueSets == null) {
// String path = theContext.getVersion().getPathToSchemaDefinitions().replace("/schema", "/valueset") + "/valuesets.xml";
// InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(path);
// if (valuesetText == null) {
// return null;
// }
// InputStreamReader reader;
// try {
// reader = new InputStreamReader(valuesetText, "UTF-8");
// } catch (UnsupportedEncodingException e) {
// // Shouldn't happen!
// throw new InternalErrorException("UTF-8 encoding not supported on this platform", e);
// }
//
// defaultValueSets = new HashMap<String, ValueSet>();
//
// Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader);
// for (BundleEntryComponent next : bundle.getEntry()) {
// IdType nextId = new IdType(next.getFullUrl());
// if (nextId.isEmpty() || !nextId.getValue().startsWith("http://hl7.org/fhir/ValueSet/")) {
// continue;
// }
// defaultValueSets.put(nextId.toVersionless().getValue(), (ValueSet) next.getResource());
// }
//
// myDefaultValueSets = defaultValueSets;
// }
//
// return (T) defaultValueSets.get(theUri);
// }
return null;
}
@Override
public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) {
ValueSet cs = fetchCodeSystem(theContext, theSystem);
CodeSystem cs = fetchCodeSystem(theContext, theSystem);
return cs != null;
}
private void loadCodeSystems(FhirContext theContext, Map<String, ValueSet> theCodeSystems, String theClasspath) {
ourLog.info("Loading code systems from classpath: {}", theClasspath);
private void loadCodeSystems(FhirContext theContext, Map<String, CodeSystem> theCodeSystems, Map<String, ValueSet> theValueSets, String theClasspath) {
ourLog.info("Loading CodeSystem/ValueSet from classpath: {}", theClasspath);
InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath);
if (valuesetText != null) {
InputStreamReader reader;
try {
reader = new InputStreamReader(valuesetText, "UTF-8");
} catch (UnsupportedEncodingException e) {
// Shouldn't happen!
throw new InternalErrorException("UTF-8 encoding not supported on this platform", e);
}
InputStreamReader reader = new InputStreamReader(valuesetText, Charsets.UTF_8);
Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader);
for (BundleEntryComponent next : bundle.getEntry()) {
ValueSet nextValueSet = (ValueSet) next.getResource();
nextValueSet.getText().setDivAsString("");
String system = nextValueSet.getCodeSystem().getSystem();
if (isNotBlank(system)) {
theCodeSystems.put(system, nextValueSet);
if (next.getResource() instanceof CodeSystem) {
CodeSystem nextValueSet = (CodeSystem) next.getResource();
nextValueSet.getText().setDivAsString("");
String system = nextValueSet.getUrl();
if (isNotBlank(system)) {
theCodeSystems.put(system, nextValueSet);
}
} else if (next.getResource() instanceof ValueSet) {
ValueSet nextValueSet = (ValueSet) next.getResource();
nextValueSet.getText().setDivAsString("");
String system = nextValueSet.getUrl();
if (isNotBlank(system)) {
theValueSets.put(system, nextValueSet);
}
}
}
} else {
ourLog.warn("Unable to load resource: {}", theClasspath);
}
}
private void loadStructureDefinitions(FhirContext theContext, Map<String, StructureDefinition> theCodeSystems, String theClasspath) {
ourLog.info("Loading structure definitions from classpath: {}", theClasspath);
InputStream valuesetText = DefaultProfileValidationSupport.class.getResourceAsStream(theClasspath);
if (valuesetText != null) {
InputStreamReader reader = new InputStreamReader(valuesetText, Charsets.UTF_8);
Bundle bundle = theContext.newXmlParser().parseResource(Bundle.class, reader);
for (BundleEntryComponent next : bundle.getEntry()) {
if (next.getResource() instanceof StructureDefinition) {
StructureDefinition nextSd = (StructureDefinition) next.getResource();
nextSd.getText().setDivAsString("");
String system = nextSd.getUrl();
if (isNotBlank(system)) {
theCodeSystems.put(system, nextSd);
}
}
}
} else {
@ -142,21 +187,37 @@ public class DefaultProfileValidationSupport implements IValidationSupport {
@Override
public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) {
ValueSet cs = fetchCodeSystem(theContext, theCodeSystem);
CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem);
if (cs != null) {
for (ConceptDefinitionComponent next : cs.getCodeSystem().getConcept()) {
for (ConceptDefinitionComponent next : cs.getConcept()) {
if (next.getCode().equals(theCode)) {
return new CodeValidationResult(next);
}
}
}
return new CodeValidationResult(IssueSeverity.INFORMATION, "Unknown code: " + theCodeSystem + " / " + theCode);
}
public void flush() {
myCodeSystems = null;
myDefaultValueSets = null;
myStructureDefinitions = null;
}
@Override
public StructureDefinition fetchStructureDefinition(FhirContext theContext, String theUrl) {
Map<String, StructureDefinition> structureDefinitions = myStructureDefinitions;
if (structureDefinitions == null) {
structureDefinitions = new HashMap<String, StructureDefinition>();
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-resources.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-types.xml");
loadStructureDefinitions(theContext, structureDefinitions, "/org/hl7/fhir/instance/model/dstu3/profile/profiles-others.xml");
myStructureDefinitions = structureDefinitions;
}
return structureDefinitions.get(theUrl);
}
}

View File

@ -1,9 +1,5 @@
package org.hl7.fhir.dstu3.hapi.validation;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collections;
@ -12,13 +8,12 @@ import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.validation.IResourceValidator.BestPracticeWarningLevel;
import org.hl7.fhir.dstu3.validation.InstanceValidator;
import org.hl7.fhir.dstu3.validation.ValidationMessage;
import org.hl7.fhir.dstu3.validation.IResourceValidator.BestPracticeWarningLevel;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@ -30,7 +25,6 @@ import com.google.gson.JsonObject;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.rest.server.EncodingEnum;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.validation.IValidationContext;
@ -163,7 +157,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
}
String resourceName = determineResourceName(document);
StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : loadProfileOrReturnNull(messages, theCtx, resourceName);
StructureDefinition profile = findStructureDefinitionForResourceName(theCtx, resourceName);
if (profile != null) {
try {
v.validate(messages, document, profile);
@ -176,7 +170,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
JsonObject json = gson.fromJson(theInput, JsonObject.class);
String resourceName = json.get("resourceType").getAsString();
StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : loadProfileOrReturnNull(messages, theCtx, resourceName);
StructureDefinition profile = findStructureDefinitionForResourceName(theCtx, resourceName);
if (profile != null) {
try {
v.validate(messages, json, profile);
@ -198,41 +192,16 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
return messages;
}
private StructureDefinition findStructureDefinitionForResourceName(final FhirContext theCtx, String resourceName) {
String sdName = "http://hl7.org/fhir/StructureDefinition/" + resourceName;
StructureDefinition profile = myStructureDefintion != null ? myStructureDefintion : myValidationSupport.fetchStructureDefinition(theCtx, sdName);
return profile;
}
@Override
protected List<ValidationMessage> validate(IValidationContext<?> theCtx) {
return validate(theCtx.getFhirContext(), theCtx.getResourceAsString(), theCtx.getResourceAsStringEncoding());
}
static StructureDefinition loadProfileOrReturnNull(List<ValidationMessage> theMessages, FhirContext theCtx, String theResourceName) {
if (isBlank(theResourceName)) {
if (theMessages != null) {
theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL).setMessage("Could not determine resource type from request. Content appears invalid."));
}
return null;
}
String profileClasspath = theCtx.getVersion().getPathToSchemaDefinitions().replace("/schema", "/profile");
String profileCpName = profileClasspath + '/' + theResourceName.toLowerCase() + ".profile.xml";
String profileText;
try {
InputStream inputStream = FhirInstanceValidator.class.getResourceAsStream(profileCpName);
if (inputStream == null) {
if (theMessages != null) {
theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL).setMessage("No profile found for resource type " + theResourceName));
return null;
} else {
return null;
}
}
profileText = IOUtils.toString(inputStream, "UTF-8");
} catch (IOException e1) {
if (theMessages != null) {
theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL).setMessage("No profile found for resource type " + theResourceName));
}
return null;
}
StructureDefinition profile = theCtx.newXmlParser().parseResource(StructureDefinition.class, profileText);
return profile;
}
}

View File

@ -1,148 +0,0 @@
package org.hl7.fhir.dstu3.hapi.validation;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.validation.QuestionnaireResponseValidator;
import org.hl7.fhir.dstu3.validation.ValidationMessage;
import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.validation.IValidationContext;
import ca.uhn.fhir.validation.IValidatorModule;
public class FhirQuestionnaireResponseValidator extends BaseValidatorBridge implements IValidatorModule {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirQuestionnaireResponseValidator.class);
private IValidationSupport myValidationSupport;
/**
* Specifies the validation support module which will be used to load as a resource loader (i.e. to
* fetch Questionnaires, Valusets, etc.)
*
* @param theValidationSupport
* The resourceloader to use. May be <code>null</code> if no resource loader should be used (in which case
* any <code>QuestionaireResponse</code> with external references will fail to validate.)
*/
public void setValidationSupport(IValidationSupport theValidationSupport) {
myValidationSupport = theValidationSupport;
}
@Override
protected List<ValidationMessage> validate(IValidationContext<?> theCtx) {
Object resource = theCtx.getResource();
if (!(theCtx.getResource() instanceof IBaseResource)) {
ourLog.debug("Not validating object of type {}", theCtx.getResource().getClass());
return Collections.emptyList();
}
if (resource instanceof QuestionnaireResponse) {
return doValidate(theCtx, (QuestionnaireResponse) resource);
}
RuntimeResourceDefinition def = theCtx.getFhirContext().getResourceDefinition((IBaseResource) resource);
if ("QuestionnaireResponse".equals(def.getName()) == false) {
return Collections.emptyList();
}
/*
* If we have a non-RI structure, convert it
*/
IParser p = theCtx.getFhirContext().newJsonParser();
String string = p.encodeResourceToString((IBaseResource) resource);
QuestionnaireResponse qa = p.parseResource(QuestionnaireResponse.class, string);
return doValidate(theCtx, qa);
}
private List<ValidationMessage> doValidate(IValidationContext<?> theValCtx, QuestionnaireResponse theResource) {
IWorkerContext workerCtx = new HapiWorkerContext(theValCtx.getFhirContext(), myValidationSupport);
ArrayList<ValidationMessage> retVal = new ArrayList<ValidationMessage>();
// if (!loadReferences(theResource, workerCtx, theValCtx, retVal)) {
// return retVal;
// }
QuestionnaireResponseValidator val = new QuestionnaireResponseValidator(workerCtx);
val.validate(retVal, theResource);
return retVal;
}
// private boolean loadReferences(IBaseResource theResource, IWorkerContext theWorkerCtx, IValidationContext<?> theValCtx, ArrayList<ValidationMessage> theMessages) {
// List<ResourceReferenceInfo> refs = theValCtx.getFhirContext().newTerser().getAllResourceReferences(theResource);
//
// List<IBaseResource> newResources = new ArrayList<IBaseResource>();
//
// for (ResourceReferenceInfo nextRefInfo : refs) {
// IIdType nextRef = nextRefInfo.getResourceReference().getReferenceElement();
// String resourceType = nextRef.getResourceType();
// if (nextRef.isLocal()) {
// IBaseResource resource = nextRefInfo.getResourceReference().getResource();
// if (resource instanceof ValueSet) {
// theWorkerCtx.getValueSets().put(nextRef.getValue(), (ValueSet) resource);
// newResources.add(resource);
// } else if (resource instanceof Questionnaire) {
// theWorkerCtx.getQuestionnaires().put(nextRef.getValue(), (Questionnaire) resource);
// newResources.add(resource);
// } else if (resource == null) {
// theMessages.add(new ValidationMessage(Source.QuestionnaireResponseValidator, org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVALID, "Invalid reference '" + nextRef.getValue() + "' - No contained resource with this ID found", IssueSeverity.FATAL));
// }
// } else if (isBlank(resourceType)) {
// theMessages.add(new ValidationMessage(Source.QuestionnaireResponseValidator, org.hl7.fhir.instance.model.OperationOutcome.IssueType.INVALID, "Invalid reference '" + nextRef.getValue() + "' - Does not identify resource type", IssueSeverity.FATAL));
// } else if ("ValueSet".equals(resourceType)) {
// if (!theWorkerCtx.getValueSets().containsKey(nextRef.getValue())) {
// ValueSet resource = tryToLoad(ValueSet.class, nextRef, theMessages);
// if (resource == null) {
// return false;
// }
// theWorkerCtx.getValueSets().put(nextRef.getValue(), resource);
// newResources.add(resource);
// }
// } else if ("Questionnaire".equals(resourceType)) {
// if (!theWorkerCtx.getQuestionnaires().containsKey(nextRef.getValue())) {
// Questionnaire resource = tryToLoad(Questionnaire.class, nextRef, theMessages);
// if (resource == null) {
// return false;
// }
// theWorkerCtx.getQuestionnaires().put(nextRef.getValue(), resource);
// newResources.add(resource);
// }
// }
// }
//
// for (IBaseResource nextAddedResource : newResources) {
// boolean outcome = loadReferences(nextAddedResource, theWorkerCtx, theValCtx, theMessages);
// if (!outcome) {
// return false;
// }
// }
//
// return true;
// }
//
// private <T extends IBaseResource> T tryToLoad(Class<T> theType, IIdType theReference, List<ValidationMessage> theMessages) {
// if (myResourceLoader == null) {
// theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL).setMessage("No resource loader present, could not load " + theReference));
// return null;
// }
//
// try {
// T retVal = myResourceLoader.load(theType, theReference);
// if (retVal == null) {
// throw new IllegalStateException("ResourceLoader returned null. This is a bug with the resourceloader. Reference was: " + theReference);
// }
// return retVal;
// } catch (ResourceNotFoundException e) {
// theMessages.add(new ValidationMessage().setLevel(IssueSeverity.FATAL).setMessage("Reference could not be found: " + theReference));
// return null;
// }
// }
}

View File

@ -1,23 +1,27 @@
package org.hl7.fhir.dstu3.hapi.validation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.dstu3.formats.IParser;
import org.hl7.fhir.dstu3.formats.ParserType;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport.CodeValidationResult;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.ConceptMap;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.ResourceType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
@ -48,7 +52,7 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
}
@Override
public ValueSet fetchCodeSystem(String theSystem) {
public CodeSystem fetchCodeSystem(String theSystem) {
if (myValidationSupport == null) {
return null;
} else {
@ -133,25 +137,23 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
@Override
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay, ValueSet theVs) {
if (theSystem == null || StringUtils.equals(theSystem, theVs.getCodeSystem().getSystem())) {
for (ConceptDefinitionComponent next : theVs.getCodeSystem().getConcept()) {
ValidationResult retVal = validateCodeSystem(theCode, next);
if (retVal != null && retVal.isOk()) {
return retVal;
}
}
}
for (ConceptSetComponent nextComposeConceptSet : theVs.getCompose().getInclude()) {
if (theSystem == null || StringUtils.equals(theSystem, nextComposeConceptSet.getSystem())) {
for (ConceptReferenceComponent nextComposeCode : nextComposeConceptSet.getConcept()) {
ConceptDefinitionComponent conceptDef = new ConceptDefinitionComponent();
conceptDef.setCode(nextComposeCode.getCode());
conceptDef.setDisplay(nextComposeCode.getDisplay());
ValidationResult retVal = validateCodeSystem(theCode, conceptDef);
if (nextComposeConceptSet.getConcept().isEmpty()) {
ValidationResult retVal = validateCode(nextComposeConceptSet.getSystem(), theCode, theDisplay);
if (retVal != null && retVal.isOk()) {
return retVal;
}
} else {
for (ConceptReferenceComponent nextComposeCode : nextComposeConceptSet.getConcept()) {
ConceptDefinitionComponent conceptDef = new ConceptDefinitionComponent();
conceptDef.setCode(nextComposeCode.getCode());
conceptDef.setDisplay(nextComposeCode.getDisplay());
ValidationResult retVal = validateCodeSystem(theCode, conceptDef);
if (retVal != null && retVal.isOk()) {
return retVal;
}
}
}
}
}
@ -236,4 +238,10 @@ public final class HapiWorkerContext implements IWorkerContext, ValueSetExpander
public ValueSetExpander getExpander() {
return new ValueSetExpanderSimple(this, this);
}
@Override
public Set<String> typeTails() {
return new HashSet<String>(Arrays.asList("Integer", "UnsignedInt", "PositiveInt", "Decimal", "DateTime", "Date", "Time", "Instant", "String", "Uri", "Oid", "Uuid", "Id", "Boolean", "Code", "Markdown", "Base64Binary", "Coding", "CodeableConcept", "Attachment", "Identifier", "Quantity",
"SampledData", "Range", "Period", "Ratio", "HumanName", "Address", "ContactPoint", "Timing", "Reference", "Annotation", "Signature", "Meta"));
}
}

View File

@ -1,8 +1,9 @@
package org.hl7.fhir.dstu3.hapi.validation;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.instance.model.api.IBaseResource;
@ -27,8 +28,9 @@ public interface IValidationSupport {
* The code system
* @return The valueset (must not be null, but can be an empty ValueSet)
*/
ValueSet fetchCodeSystem(FhirContext theContext, String theSystem);
CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem);
/**
* Loads a resource needed by the validation (a StructureDefinition, or a
* ValueSet)
@ -44,6 +46,8 @@ public interface IValidationSupport {
*/
<T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri);
StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl);
/**
* Returns <code>true</code> if codes in the given code system can be expanded
* or validated
@ -70,13 +74,13 @@ public interface IValidationSupport {
*/
CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay);
public class CodeValidationResult {
public class CodeValidationResult {
private ConceptDefinitionComponent definition;
private String message;
private IssueSeverity severity;
public CodeValidationResult(ConceptDefinitionComponent definition) {
this.definition = definition;
public CodeValidationResult(ConceptDefinitionComponent theNext) {
this.definition = theNext;
}
public CodeValidationResult(IssueSeverity severity, String message) {

View File

@ -3,6 +3,8 @@ package org.hl7.fhir.dstu3.hapi.validation;
import java.util.ArrayList;
import java.util.List;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
@ -12,81 +14,92 @@ import ca.uhn.fhir.context.FhirContext;
public class ValidationSupportChain implements IValidationSupport {
private List<IValidationSupport> myChain;
private List<IValidationSupport> myChain;
/**
* Constructor
*/
public ValidationSupportChain() {
myChain = new ArrayList<IValidationSupport>();
}
/**
* Constructor
*/
public ValidationSupportChain() {
myChain = new ArrayList<IValidationSupport>();
}
/**
* Constructor
*/
public ValidationSupportChain(IValidationSupport... theValidationSupportModules) {
this();
for (IValidationSupport next : theValidationSupportModules) {
if (next != null) {
myChain.add(next);
}
}
}
/**
* Constructor
*/
public ValidationSupportChain(IValidationSupport... theValidationSupportModules) {
this();
for (IValidationSupport next : theValidationSupportModules) {
if (next != null) {
myChain.add(next);
}
}
}
public void addValidationSupport(IValidationSupport theValidationSupport) {
myChain.add(theValidationSupport);
}
public void addValidationSupport(IValidationSupport theValidationSupport) {
myChain.add(theValidationSupport);
}
@Override
public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) {
return next.expandValueSet(theCtx, theInclude);
}
}
return myChain.get(0).expandValueSet(theCtx, theInclude);
}
@Override
public ValueSetExpansionComponent expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) {
return next.expandValueSet(theCtx, theInclude);
}
}
return myChain.get(0).expandValueSet(theCtx, theInclude);
}
@Override
public ValueSet fetchCodeSystem(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
ValueSet retVal = next.fetchCodeSystem(theCtx, theSystem);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override
public CodeSystem fetchCodeSystem(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
CodeSystem retVal = next.fetchCodeSystem(theCtx, theSystem);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override
public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) {
for (IValidationSupport next : myChain) {
T retVal = next.fetchResource(theContext, theClass, theUri);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override
public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) {
for (IValidationSupport next : myChain) {
T retVal = next.fetchResource(theContext, theClass, theUri);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override
public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theSystem)) {
return true;
}
}
return false;
}
@Override
public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) {
for (IValidationSupport next : myChain) {
StructureDefinition retVal = next.fetchStructureDefinition(theCtx, theUrl);
if (retVal != null) {
return retVal;
}
}
return null;
}
@Override
public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theCodeSystem)) {
return next.validateCode(theCtx, theCodeSystem, theCode, theDisplay);
}
}
return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay);
}
@Override
public boolean isCodeSystemSupported(FhirContext theCtx, String theSystem) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theSystem)) {
return true;
}
}
return false;
}
@Override
public CodeValidationResult validateCode(FhirContext theCtx, String theCodeSystem, String theCode, String theDisplay) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theCtx, theCodeSystem)) {
return next.validateCode(theCtx, theCodeSystem, theCode, theDisplay);
}
}
return myChain.get(0).validateCode(theCtx, theCodeSystem, theCode, theDisplay);
}
}

View File

@ -53,7 +53,7 @@ public class DocumentManifest extends DomainResource {
/**
* The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed.
*/
@Child(name = "p", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Child(name = "p", type = {Attachment.class, ValueSet.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." )
protected Type p;

View File

@ -208,6 +208,9 @@ public final class IdType extends UriType implements IPrimitiveType<String>, IId
myUnqualifiedId = theId;
myUnqualifiedVersionId = StringUtils.defaultIfBlank(theVersionId, null);
myHaveComponentParts = true;
if (isBlank(myBaseUrl) && isBlank(myResourceType) && isBlank(myUnqualifiedId) && isBlank(myUnqualifiedVersionId)) {
myHaveComponentParts = false;
}
}
/**

View File

@ -0,0 +1,72 @@
package org.hl7.fhir.dstu3.terminologies;
import java.util.List;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemPropertyComponent;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionPropertyComponent;
import org.hl7.fhir.dstu3.model.CodeSystem.PropertyType;
public class CodeSystemUtilities {
public static boolean isDeprecated(CodeSystem cs, ConceptDefinitionComponent def) {
for (ConceptDefinitionPropertyComponent p : def.getProperty()) {
if (p.getCode().equals("deprecated") && p.hasValue() && p.getValue() instanceof BooleanType)
return ((BooleanType) p.getValue()).getValue();
}
return false;
}
public static boolean isAbstract(CodeSystem cs, ConceptDefinitionComponent def) {
for (ConceptDefinitionPropertyComponent p : def.getProperty()) {
if (p.getCode().equals("abstract") && p.hasValue() && p.getValue() instanceof BooleanType)
return ((BooleanType) p.getValue()).getValue();
}
return false;
}
public static void setAbstract(CodeSystem cs, ConceptDefinitionComponent concept) {
defineAbstractProperty(cs);
concept.addProperty().setCode("abstract").setValue(new BooleanType(true));
}
public static void setDeprecated(CodeSystem cs, ConceptDefinitionComponent concept) {
defineAbstractProperty(cs);
concept.addProperty().setCode("deprecated").setValue(new BooleanType(true));
}
public static void defineAbstractProperty(CodeSystem cs) {
defineCodeSystemProperty(cs, "abstract", "Indicates that the code is abstract - only intended to be used as a selector for other concepts", PropertyType.BOOLEAN);
}
public static void defineDeprecatedProperty(CodeSystem cs) {
defineCodeSystemProperty(cs, "deprecated", "Indicates that the code should not longer be used", PropertyType.BOOLEAN);
}
public static void defineCodeSystemProperty(CodeSystem cs, String code, String description, PropertyType type) {
for (CodeSystemPropertyComponent p : cs.getProperty()) {
if (p.getCode().equals(code))
return;
}
cs.addProperty().setCode(code).setDescription(description).setType(type);
}
public static String getCodeDefinition(CodeSystem cs, String code) {
return getCodeDefinition(cs.getConcept(), code);
}
private static String getCodeDefinition(List<ConceptDefinitionComponent> list, String code) {
for (ConceptDefinitionComponent c : list) {
if (c.getCode().equals(code))
return c.getDefinition();
String s = getCodeDefinition(c.getConcept(), code);
if (s != null)
return s;
}
return null;
}
}

View File

@ -4,7 +4,8 @@ import java.util.List;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent;
@ -28,8 +29,6 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
@Override
public boolean codeInValueSet(String system, String code) throws EOperationOutcome, Exception {
if (valueset.hasCodeSystem() && system.equals(valueset.getCodeSystem().getSystem()) && codeInDefine(valueset.getCodeSystem().getConcept(), code, valueset.getCodeSystem().getCaseSensitive()))
return true;
if (valueset.hasCompose()) {
boolean ok = false;
@ -88,9 +87,9 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
return true;
}
ValueSet def = context.fetchCodeSystem(system);
CodeSystem def = context.fetchCodeSystem(system);
if (def != null) {
if (!def.getCodeSystem().getCaseSensitive()) {
if (!def.getCaseSensitive()) {
// well, ok, it's not case sensitive - we'll check that too now
for (ConceptReferenceComponent cc : vsi.getConcept())
if (cc.getCode().equalsIgnoreCase(code)) {
@ -98,7 +97,7 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
}
}
if (vsi.getConcept().isEmpty() && vsi.getFilter().isEmpty()) {
return codeInDefine(def.getCodeSystem().getConcept(), code, def.getCodeSystem().getCaseSensitive());
return codeInDefine(def.getConcept(), code, def.getCaseSensitive());
}
for (ConceptSetFilterComponent f: vsi.getFilter())
throw new Error("not done yet: "+f.getValue());

View File

@ -45,7 +45,8 @@ import org.hl7.fhir.dstu3.model.PrimitiveType;
import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent;
@ -82,7 +83,6 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
focus.getExpansion().setTimestampElement(DateTimeType.now());
focus.getExpansion().setIdentifier(Factory.createUUID());
handleDefine(source, focus.getExpansion().getParameter());
if (source.hasCompose())
handleCompose(source.getCompose(), focus.getExpansion().getParameter());
@ -145,11 +145,17 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
private void includeCodes(ConceptSetComponent inc, List<ValueSetExpansionParameterComponent> params) throws TerminologyServiceException, ETooCostly {
if (context.supportsSystem(inc.getSystem())) {
try {
int i = codes.size();
addCodes(context.expandVS(inc), params);
if (codes.size() > i)
return;
} catch (Exception e) {
// ok, we'll try locally
}
}
ValueSet cs = context.fetchCodeSystem(inc.getSystem());
CodeSystem cs = context.fetchCodeSystem(inc.getSystem());
if (cs == null)
throw new TerminologyServiceException("unable to find code system "+inc.getSystem().toString());
if (cs.hasVersion())
@ -157,8 +163,8 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(cs.getUrl()+"?version="+cs.getVersion())));
if (inc.getConcept().size() == 0 && inc.getFilter().size() == 0) {
// special case - add all the code system
for (ConceptDefinitionComponent def : cs.getCodeSystem().getConcept()) {
addCodeAndDescendents(inc.getSystem(), def);
for (ConceptDefinitionComponent def : cs.getConcept()) {
addCodeAndDescendents(cs, inc.getSystem(), def);
}
}
@ -171,10 +177,10 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
ConceptSetFilterComponent fc = inc.getFilter().get(0);
if ("concept".equals(fc.getProperty()) && fc.getOp() == FilterOperator.ISA) {
// special: all non-abstract codes in the target code system under the value
ConceptDefinitionComponent def = getConceptForCode(cs.getCodeSystem().getConcept(), fc.getValue());
ConceptDefinitionComponent def = getConceptForCode(cs.getConcept(), fc.getValue());
if (def == null)
throw new TerminologyServiceException("Code '"+fc.getValue()+"' not found in system '"+inc.getSystem()+"'");
addCodeAndDescendents(inc.getSystem(), def);
addCodeAndDescendents(cs, inc.getSystem(), def);
} else
throw new NotImplementedException("not done yet");
}
@ -193,17 +199,17 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
}
}
private void addCodeAndDescendents(String system, ConceptDefinitionComponent def) {
if (!ToolingExtensions.hasDeprecated(def)) {
if (!def.hasAbstractElement() || !def.getAbstract())
private void addCodeAndDescendents(CodeSystem cs, String system, ConceptDefinitionComponent def) {
if (!CodeSystemUtilities.isDeprecated(cs, def)) {
if (!CodeSystemUtilities.isAbstract(cs, def))
addCode(system, def.getCode(), def.getDisplay());
for (ConceptDefinitionComponent c : def.getConcept())
addCodeAndDescendents(system, c);
addCodeAndDescendents(cs, system, c);
}
}
private void excludeCodes(ConceptSetComponent inc, List<ValueSetExpansionParameterComponent> params) throws TerminologyServiceException {
ValueSet cs = context.fetchCodeSystem(inc.getSystem().toString());
CodeSystem cs = context.fetchCodeSystem(inc.getSystem().toString());
if (cs == null)
throw new TerminologyServiceException("unable to find value set "+inc.getSystem().toString());
if (inc.getConcept().size() == 0 && inc.getFilter().size() == 0) {
@ -223,10 +229,10 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
}
private String getCodeDisplay(ValueSet cs, String code) throws TerminologyServiceException {
ConceptDefinitionComponent def = getConceptForCode(cs.getCodeSystem().getConcept(), code);
private String getCodeDisplay(CodeSystem cs, String code) throws TerminologyServiceException {
ConceptDefinitionComponent def = getConceptForCode(cs.getConcept(), code);
if (def == null)
throw new TerminologyServiceException("Unable to find code '"+code+"' in code system "+cs.getCodeSystem().getSystem());
throw new TerminologyServiceException("Unable to find code '"+code+"' in code system "+cs.getUrl());
return def.getDisplay();
}
@ -241,16 +247,6 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
return null;
}
private void handleDefine(ValueSet vs, List<ValueSetExpansionParameterComponent> list) {
if (vs.hasVersion())
list.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(vs.getUrl()+"?version="+vs.getVersion())));
if (vs.hasCodeSystem()) {
// simple case: just generate the return
for (ConceptDefinitionComponent c : vs.getCodeSystem().getConcept())
addDefinedCode(vs, vs.getCodeSystem().getSystem(), c);
}
}
private String key(ValueSetExpansionContainsComponent c) {
return key(c.getSystem(), c.getCode());
}
@ -259,17 +255,6 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
return "{"+uri+"}"+code;
}
private void addDefinedCode(ValueSet vs, String system, ConceptDefinitionComponent c) {
if (!ToolingExtensions.hasDeprecated(c)) {
if (!c.hasAbstractElement() || !c.getAbstract()) {
addCode(system, c.getCode(), c.getDisplay());
}
for (ConceptDefinitionComponent g : c.getConcept())
addDefinedCode(vs, vs.getCodeSystem().getSystem(), g);
}
}
private void addCode(String system, String code, String display) {
ValueSetExpansionContainsComponent n = new ValueSet.ValueSetExpansionContainsComponent();
n.setSystem(system);

View File

@ -0,0 +1,125 @@
package org.hl7.fhir.dstu3.terminologies;
/*
Copyright (c) 2011+, HL7, Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
import org.hl7.fhir.dstu3.model.OperationOutcome;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.utils.ToolingExtensions;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.xhtml.XhtmlComposer;
public class ValueSetExpansionCache implements ValueSetExpanderFactory {
public class CacheAwareExpander implements ValueSetExpander {
@Override
public ValueSetExpansionOutcome expand(ValueSet source) throws ETooCostly, IOException {
if (expansions.containsKey(source.getUrl()))
return expansions.get(source.getUrl());
ValueSetExpander vse = new ValueSetExpanderSimple(context, ValueSetExpansionCache.this);
ValueSetExpansionOutcome vso = vse.expand(source);
if (vso.getError() != null) {
// well, we'll see if the designated server can expand it, and if it can, we'll cache it locally
vso = context.expandVS(source, false);
FileOutputStream s = new FileOutputStream(Utilities.path(cacheFolder, makeFile(source.getUrl())));
context.newXmlParser().setOutputStyle(OutputStyle.PRETTY).compose(s, vso.getValueset());
s.close();
}
expansions.put(source.getUrl(), vso);
return vso;
}
private String makeFile(String url) {
return url.replace("$", "").replace(":", "").replace("//", "/").replace("/", "_")+".xml";
}
}
private static final String VS_ID_EXT = "http://tools/cache";
private final Map<String, ValueSetExpansionOutcome> expansions = new HashMap<String, ValueSetExpansionOutcome>();
private final IWorkerContext context;
private final String cacheFolder;
public ValueSetExpansionCache(IWorkerContext context) {
super();
cacheFolder = null;
this.context = context;
}
public ValueSetExpansionCache(IWorkerContext context, String cacheFolder) throws FHIRFormatError, IOException {
super();
this.context = context;
this.cacheFolder = cacheFolder;
if (this.cacheFolder != null)
loadCache();
}
private void loadCache() throws FHIRFormatError, IOException {
File[] files = new File(cacheFolder).listFiles();
for (File f : files) {
if (f.getName().endsWith(".xml")) {
final FileInputStream is = new FileInputStream(f);
try {
Resource r = context.newXmlParser().setOutputStyle(OutputStyle.PRETTY).parse(is);
if (r instanceof OperationOutcome) {
OperationOutcome oo = (OperationOutcome) r;
expansions.put(ToolingExtensions.getExtension(oo,VS_ID_EXT).getValue().toString(),
new ValueSetExpansionOutcome(new XhtmlComposer().setXmlOnly(true).composePlainText(oo.getText().getDiv())));
} else {
ValueSet vs = (ValueSet) r;
expansions.put(vs.getUrl(), new ValueSetExpansionOutcome(vs, null));
}
} finally {
IOUtils.closeQuietly(is);
}
}
}
}
@Override
public ValueSetExpander getExpander() {
return new CacheAwareExpander();
// return new ValueSetExpander(valuesets, codesystems);
}
}

View File

@ -0,0 +1,40 @@
package org.hl7.fhir.dstu3.terminologies;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.Meta;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
public class ValueSetUtilities {
public static ValueSet makeShareable(ValueSet vs) {
if (!vs.hasMeta())
vs.setMeta(new Meta());
for (UriType t : vs.getMeta().getProfile())
if (t.getValue().equals("http://hl7.org/fhir/StructureDefinition/valueset-shareable-definition"))
return vs;
vs.getMeta().getProfile().add(new UriType("http://hl7.org/fhir/StructureDefinition/valueset-shareable-definition"));
return vs;
}
public static CodeSystem makeShareable(CodeSystem cs) {
if (!cs.hasMeta())
cs.setMeta(new Meta());
for (UriType t : cs.getMeta().getProfile())
if (t.getValue().equals("http://hl7.org/fhir/StructureDefinition/valueset-shareable-definition"))
return cs;
cs.getMeta().getProfile().add(new UriType("http://hl7.org/fhir/StructureDefinition/valueset-shareable-definition"));
return cs;
}
public static void checkShareable(ValueSet vs) {
if (!vs.hasMeta())
throw new Error("ValueSet "+vs.getUrl()+" is not shareable");
for (UriType t : vs.getMeta().getProfile()) {
if (t.getValue().equals("http://hl7.org/fhir/StructureDefinition/valueset-shareable-definition"))
return;
}
throw new Error("ValueSet "+vs.getUrl()+" is not shareable");
}
}

View File

@ -1,16 +1,18 @@
package org.hl7.fhir.dstu3.utils;
import java.util.List;
import java.util.Set;
import org.hl7.fhir.dstu3.formats.IParser;
import org.hl7.fhir.dstu3.formats.ParserType;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.ConceptMap;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
@ -140,14 +142,14 @@ public interface IWorkerContext {
// these are the terminology services used internally by the tools
/**
* Find a value set for the nominated system uri.
* Find the code system definition for the nominated system uri.
* return null if there isn't one (then the tool might try
* supportsSystem)
*
* @param system
* @return
*/
public ValueSet fetchCodeSystem(String system);
public CodeSystem fetchCodeSystem(String system);
/**
* True if the underlying terminology service provider will do
@ -286,5 +288,8 @@ public interface IWorkerContext {
*/
public String getAbbreviation(String name);
// return a set of types that have tails
public Set<String> typeTails();
}

View File

@ -38,6 +38,7 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.hl7.fhir.dstu3.exceptions.FHIRFormatError;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.Coding;
@ -52,23 +53,22 @@ import org.hl7.fhir.dstu3.model.Identifier;
import org.hl7.fhir.dstu3.model.IntegerType;
import org.hl7.fhir.dstu3.model.MarkdownType;
import org.hl7.fhir.dstu3.model.PrimitiveType;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetCodeSystemComponent;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.validation.ValidationMessage.Source;
public class ToolingExtensions {
// validated
public static final String EXT_SUBSUMES = "http://hl7.org/fhir/StructureDefinition/valueset-subsumes";
public static final String EXT_SUBSUMES = "http://hl7.org/fhir/StructureDefinition/codesystem-subsumes";
private static final String EXT_OID = "http://hl7.org/fhir/StructureDefinition/valueset-oid";
public static final String EXT_DEPRECATED = "http://hl7.org/fhir/StructureDefinition/valueset-deprecated";
// public static final String EXT_DEPRECATED = "http://hl7.org/fhir/StructureDefinition/codesystem-deprecated";
public static final String EXT_DEFINITION = "http://hl7.org/fhir/StructureDefinition/valueset-definition";
public static final String EXT_COMMENT = "http://hl7.org/fhir/StructureDefinition/valueset-comments";
private static final String EXT_IDENTIFIER = "http://hl7.org/fhir/StructureDefinition/identifier";
@ -84,8 +84,6 @@ public class ToolingExtensions {
public static final String EXT_MAXOCCURS = "http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs";
public static final String EXT_ALLOWEDRESOURCE = "http://hl7.org/fhir/StructureDefinition/questionnaire-allowedResource";
public static final String EXT_REFERENCEFILTER = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter";
public static final String EXT_EXPRESSION = "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression";
public static final String EXT_SEARCH_EXPRESSION = "http://hl7.org/fhir/StructureDefinition/searchparameter-expression";
// unregistered?
@ -132,6 +130,16 @@ public class ToolingExtensions {
}
}
public static void addMarkdownExtension(DomainResource dr, String url, String content) {
if (!StringUtils.isBlank(content)) {
Extension ex = getExtension(dr, url);
if (ex != null)
ex.setValue(new StringType(content));
else
dr.getExtension().add(Factory.newExtension(url, new MarkdownType(content), true));
}
}
public static void addStringExtension(Element e, String url, String content) {
if (!StringUtils.isBlank(content)) {
Extension ex = getExtension(e, url);
@ -155,10 +163,10 @@ public class ToolingExtensions {
nc.getExtension().add(Factory.newExtension(EXT_COMMENT, Factory.newString_(comment), true));
}
public static void markDeprecated(Element nc) {
setDeprecated(nc);
}
// public static void markDeprecated(Element nc) {
// setDeprecated(nc);
// }
//
public static void addSubsumes(ConceptDefinitionComponent nc, String code) {
nc.getModifierExtension().add(Factory.newExtension(EXT_SUBSUMES, Factory.newCode(code), true));
}
@ -239,18 +247,18 @@ public class ToolingExtensions {
public static String getComment(ConceptDefinitionComponent c) {
return readStringExtension(c, EXT_COMMENT);
}
public static Boolean getDeprecated(Element c) {
return readBooleanExtension(c, EXT_DEPRECATED);
}
//
// public static Boolean getDeprecated(Element c) {
// return readBooleanExtension(c, EXT_DEPRECATED);
// }
public static boolean hasComment(ConceptDefinitionComponent c) {
return findStringExtension(c, EXT_COMMENT);
}
public static boolean hasDeprecated(Element c) {
return findBooleanExtension(c, EXT_DEPRECATED);
}
// public static boolean hasDeprecated(Element c) {
// return findBooleanExtension(c, EXT_DEPRECATED);
// }
public static List<CodeType> getSubsumes(ConceptDefinitionComponent c) {
List<CodeType> res = new ArrayList<CodeType>();
@ -335,7 +343,7 @@ public class ToolingExtensions {
resource.getExtension().add(new Extension(new UriType(uri)).setValue(new StringType(value)));
}
public static String getOID(ValueSetCodeSystemComponent define) {
public static String getOID(CodeSystem define) {
return readStringExtension(define, EXT_OID);
}
@ -343,19 +351,25 @@ public class ToolingExtensions {
return readStringExtension(vs, EXT_OID);
}
public static void setOID(ValueSetCodeSystemComponent define, String oid) throws FHIRFormatError, URISyntaxException {
public static void setOID(CodeSystem define, String oid) throws FHIRFormatError, URISyntaxException {
if (!oid.startsWith("urn:oid:"))
throw new FHIRFormatError("Error in OID format");
if (oid.startsWith("urn:oid:urn:oid:"))
throw new FHIRFormatError("Error in OID format");
if (!hasExtension(define, EXT_OID))
define.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
else if (!oid.equals(readStringExtension(define, EXT_OID)))
throw new Error("Attempt to assign multiple OIDs to a code system");
}
public static void setOID(ValueSet vs, String oid) throws FHIRFormatError, URISyntaxException {
if (!oid.startsWith("urn:oid:"))
throw new FHIRFormatError("Error in OID format");
if (oid.startsWith("urn:oid:urn:oid:"))
throw new FHIRFormatError("Error in OID format");
if (!hasExtension(vs, EXT_OID))
vs.getExtension().add(Factory.newExtension(EXT_OID, Factory.newUri(oid), false));
else if (!oid.equals(readStringExtension(vs, EXT_OID)))
throw new Error("Attempt to assign multiple OIDs to value set "+vs.getName()+" ("+vs.getUrl()+"). Has "+readStringExtension(vs, EXT_OID)+", trying to add "+oid);
}
public static boolean hasLanguageTranslation(Element element, String lang) {
@ -432,14 +446,14 @@ public class ToolingExtensions {
de.getExtension().add(new Extension().setUrl(EXT_CIMI_REFERENCE).setValue(new UriType(value)));
}
public static void setDeprecated(Element nc) {
for (Extension e : nc.getExtension())
if (e.getUrl().equals(EXT_DEPRECATED)) {
e.setValue(new BooleanType(true));
return;
}
nc.getExtension().add(new Extension().setUrl(EXT_DEPRECATED).setValue(new BooleanType(true)));
}
// public static void setDeprecated(Element nc) {
// for (Extension e : nc.getExtension())
// if (e.getUrl().equals(EXT_DEPRECATED)) {
// e.setValue(new BooleanType(true));
// return;
// }
// nc.getExtension().add(new Extension().setUrl(EXT_DEPRECATED).setValue(new BooleanType(true)));
// }
public static void setExtension(Element focus, String url, Coding c) {
for (Extension e : focus.getExtension())
@ -469,6 +483,10 @@ public class ToolingExtensions {
}
}
}
public static boolean hasOID(ValueSet vs) {
return hasExtension(vs, EXT_OID);
}
}

View File

@ -1,396 +0,0 @@
package org.hl7.fhir.dstu3.validation;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.dstu3.model.Attachment;
import org.hl7.fhir.dstu3.model.BooleanType;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.DateTimeType;
import org.hl7.fhir.dstu3.model.DateType;
import org.hl7.fhir.dstu3.model.DecimalType;
import org.hl7.fhir.dstu3.model.InstantType;
import org.hl7.fhir.dstu3.model.IntegerType;
import org.hl7.fhir.dstu3.model.Quantity;
import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.TimeType;
import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.dstu3.model.UriType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.OperationOutcome.IssueType;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
/**
* Validates that an instance of {@link QuestionnaireResponse} is valid against the {@link Questionnaire} that it claims
* to conform to.
*
* @author James Agnew
*/
public class QuestionnaireResponseValidator extends BaseValidator {
/*
* ***************************************************************** Note to anyone working on this class -
*
* This class has unit tests which run within the HAPI project build. Please sync any changes here to HAPI and ensure
* that unit tests are run. ****************************************************************
*/
private IWorkerContext myWorkerCtx;
public QuestionnaireResponseValidator(IWorkerContext theWorkerCtx) {
this.myWorkerCtx = theWorkerCtx;
}
private Set<Class<? extends Type>> allowedTypes(Class<? extends Type> theClass0) {
return allowedTypes(theClass0, null);
}
private Set<Class<? extends Type>> allowedTypes(Class<? extends Type> theClass0, Class<? extends Type> theClass1) {
HashSet<Class<? extends Type>> retVal = new HashSet<Class<? extends Type>>();
retVal.add(theClass0);
if (theClass1 != null) {
retVal.add(theClass1);
}
return Collections.unmodifiableSet(retVal);
}
private List<QuestionnaireResponseItemComponent> findResponsesByLinkId(List<QuestionnaireResponseItemComponent> theItem, String theLinkId) {
Validate.notBlank(theLinkId, "theLinkId must not be blank");
ArrayList<QuestionnaireResponseItemComponent> retVal = new ArrayList<QuestionnaireResponse.QuestionnaireResponseItemComponent>();
for (QuestionnaireResponseItemComponent next : theItem) {
if (theLinkId.equals(next.getLinkId())) {
retVal.add(next);
}
}
return retVal;
}
public void validate(List<ValidationMessage> theErrors, QuestionnaireResponse theAnswers) {
LinkedList<String> pathStack = new LinkedList<String>();
pathStack.add("QuestionnaireResponse");
pathStack.add(QuestionnaireResponse.SP_QUESTIONNAIRE);
if (!fail(theErrors, IssueType.INVALID, pathStack, theAnswers.hasQuestionnaire(), "QuestionnaireResponse does not specity which questionnaire it is providing answers to")) {
return;
}
Reference questionnaireRef = theAnswers.getQuestionnaire();
Questionnaire questionnaire = getQuestionnaire(theAnswers, questionnaireRef);
if (!fail(theErrors, IssueType.INVALID, pathStack, questionnaire != null, "Questionnaire {0} is not found in the WorkerContext", theAnswers.getQuestionnaire().getReference())) {
return;
}
QuestionnaireResponseStatus status = theAnswers.getStatus();
boolean validateRequired = false;
if (status == QuestionnaireResponseStatus.COMPLETED || status == QuestionnaireResponseStatus.AMENDED) {
validateRequired = true;
}
pathStack.removeLast();
// pathStack.add("group(0)");
validateItems(theErrors, questionnaire.getItem(), theAnswers.getItem(), pathStack, theAnswers, validateRequired);
}
private Questionnaire getQuestionnaire(QuestionnaireResponse theAnswers, Reference theQuestionnaireRef) {
Questionnaire retVal;
String value = theQuestionnaireRef.getReferenceElement().getValue();
if (theQuestionnaireRef.getReferenceElement().isLocal()) {
retVal = (Questionnaire) theQuestionnaireRef.getResource();
if (retVal == null) {
for (Resource next : theAnswers.getContained()) {
if (value.equals(next.getId())) {
retVal = (Questionnaire) next;
}
}
}
} else {
retVal = myWorkerCtx.fetchResource(Questionnaire.class, value);
}
return retVal;
}
private ValueSet getValueSet(QuestionnaireResponse theResponse, Reference theQuestionnaireRef) {
ValueSet retVal;
if (theQuestionnaireRef.getReferenceElement().isLocal()) {
retVal = (ValueSet) theQuestionnaireRef.getResource();
if (retVal == null) {
for (Resource next : theResponse.getContained()) {
if (theQuestionnaireRef.getReferenceElement().getValue().equals(next.getId())) {
retVal = (ValueSet) next;
}
}
}
} else {
retVal = myWorkerCtx.fetchResource(ValueSet.class, theQuestionnaireRef.getReferenceElement().getValue());
}
return retVal;
}
private void validateGroup(List<ValidationMessage> theErrors, QuestionnaireItemComponent theQuestGroup, QuestionnaireResponseItemComponent theRespGroup, LinkedList<String> thePathStack, QuestionnaireResponse theResponse, boolean theValidateRequired) {
validateItems(theErrors, theQuestGroup.getItem(), theRespGroup.getItem(), thePathStack, theResponse, theValidateRequired);
}
private void validateQuestion(List<ValidationMessage> theErrors, QuestionnaireItemComponent theQuestion, QuestionnaireResponseItemComponent theRespGroup, LinkedList<String> thePathStack, QuestionnaireResponse theResponse, boolean theValidateRequired) {
String linkId = theQuestion.getLinkId();
if (!fail(theErrors, IssueType.INVALID, thePathStack, isNotBlank(linkId), "Questionnaire is invalid, question found with no link ID")) {
return;
}
QuestionnaireItemType type = theQuestion.getType();
if (type == null) {
rule(theErrors, IssueType.INVALID, thePathStack, false, "Questionnaire is invalid, no type specified for question with link ID[{0}]", linkId);
return;
}
// List<QuestionnaireResponseItemComponent> responses;
// if (theRespGroup == null) {
// responses = findResponsesByLinkId(theResponse.getItem(), linkId);
// } else {
// responses = findResponsesByLinkId(theRespGroup.getItem(), linkId);
// }
List<QuestionnaireResponseItemAnswerComponent> responses = theRespGroup.getAnswer();
if (responses.size() > 1) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, !theQuestion.getRepeats(), "Multiple answers found with linkId[{0}]", linkId);
}
if (responses.size() == 0) {
if (theValidateRequired) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, !theQuestion.getRequired(), "Missing answer item for required item with linkId[{0}]", linkId);
} else {
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, !theQuestion.getRequired(), "Missing answer item for required item with linkId[{0}]", linkId);
}
return;
}
// QuestionnaireResponseItemComponent responseItem = responses.get(0);
try {
// thePathStack.add("item(" + responses.indexOf(responseItem) + ")");
validateQuestionAnswers(theErrors, theQuestion, thePathStack, type, theRespGroup, theResponse, theValidateRequired);
} finally {
// thePathStack.removeLast();
}
}
private void validateItems(List<ValidationMessage> theErrors, List<QuestionnaireItemComponent> theQuestionnaireItems, List<QuestionnaireResponseItemComponent> theResponseItems, LinkedList<String> thePathStack, QuestionnaireResponse theResponse, boolean theValidateRequired) {
Set<String> allowedItems = new HashSet<String>();
for (QuestionnaireItemComponent nextQuestionnaireItem : theQuestionnaireItems) {
if (nextQuestionnaireItem.getType()== QuestionnaireItemType.NULL || nextQuestionnaireItem.getType() == null) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Questionnaire definition contains item with no type");
String linkId = nextQuestionnaireItem.getLinkId();
if (isNotBlank(linkId)) {
// Just so that we don't also get a warning about the answer being present
allowedItems.add(linkId);
}
continue;
}
if (!QuestionnaireItemType.DISPLAY.equals(nextQuestionnaireItem.getType())) {
String itemType = QuestionnaireItemType.GROUP.equals(nextQuestionnaireItem.getType()) ? "group" : "question";
String linkId = nextQuestionnaireItem.getLinkId();
if (isBlank(linkId)) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Questionnaire definition contains {0} with no linkId", itemType);
continue;
}
allowedItems.add(linkId);
List<QuestionnaireResponseItemComponent> responseItems = findResponsesByLinkId(theResponseItems, linkId);
if (responseItems.isEmpty()) {
if (nextQuestionnaireItem.getRequired()) {
if (theValidateRequired) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
} else {
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
}
}
continue;
}
if (responseItems.size() > 1) {
if (nextQuestionnaireItem.getRepeats() == false) {
int index = theResponseItems.indexOf(responseItems.get(1));
thePathStack.add("item(" + index + ")");
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Multiple repetitions of {0} with linkId[{1}] found at this position, but this item cannot repeat", itemType, linkId);
thePathStack.removeLast();
}
}
for (QuestionnaireResponseItemComponent nextResponseItem : responseItems) {
int index = theResponseItems.indexOf(nextResponseItem);
thePathStack.add("item(" + index + ")");
if (nextQuestionnaireItem.getType() == QuestionnaireItemType.GROUP) {
validateGroup(theErrors, nextQuestionnaireItem, nextResponseItem, thePathStack, theResponse, theValidateRequired);
} else {
validateQuestion(theErrors, nextQuestionnaireItem, nextResponseItem, thePathStack, theResponse, theValidateRequired);
}
thePathStack.removeLast();
}
}
}
// Make sure there are no items in response that aren't in the questionnaire
int idx = -1;
for (QuestionnaireResponseItemComponent next : theResponseItems) {
idx++;
if (!allowedItems.contains(next.getLinkId())) {
thePathStack.add("item(" + idx + ")");
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Item with linkId[{0}] found at this position, but this item does not exist at this position in Questionnaire", next.getLinkId());
thePathStack.removeLast();
}
}
}
private void validateQuestionAnswers(List<ValidationMessage> theErrors, QuestionnaireItemComponent theQuestion, LinkedList<String> thePathStack, QuestionnaireItemType type, QuestionnaireResponseItemComponent responseQuestion, QuestionnaireResponse theResponse, boolean theValidateRequired) {
String linkId = theQuestion.getLinkId();
Set<Class<? extends Type>> allowedAnswerTypes = determineAllowedAnswerTypes(type);
if (allowedAnswerTypes.isEmpty()) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, responseQuestion.isEmpty(), "Question with linkId[{0}] has no answer type but an answer was provided", linkId);
} else {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, !(responseQuestion.getAnswer().size() > 1 && !theQuestion.getRepeats()), "Multiple answers to non repeating question with linkId[{0}]", linkId);
if (theValidateRequired) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, !(theQuestion.getRequired() && responseQuestion.getAnswer().isEmpty()), "Missing answer to required question with linkId[{0}]", linkId);
} else {
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, !(theQuestion.getRequired() && responseQuestion.getAnswer().isEmpty()), "Missing answer to required question with linkId[{0}]", linkId);
}
}
int answerIdx = -1;
for (QuestionnaireResponseItemAnswerComponent nextAnswer : responseQuestion.getAnswer()) {
answerIdx++;
try {
thePathStack.add("answer(" + answerIdx + ")");
Type nextValue = nextAnswer.getValue();
if (!allowedAnswerTypes.contains(nextValue.getClass())) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] found of type [{1}] but this is invalid for question of type [{2}]", linkId, nextValue.getClass().getSimpleName(), type.toCode());
continue;
}
// Validate choice answers
if (type == QuestionnaireItemType.CHOICE || type == QuestionnaireItemType.OPENCHOICE) {
if (nextAnswer.getValue() instanceof StringType) {
// n.b. we can only be here if it's an open-choice
String value = ((StringType)nextAnswer.getValue()).getValue();
if (isBlank(value)) {
if (Boolean.TRUE.equals(theQuestion.getRequiredElement().getValue())) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] has no value but this item is required", linkId);
}
}
} else {
Coding coding = (Coding) nextAnswer.getValue();
if (isBlank(coding.getCode()) && isBlank(coding.getDisplay()) && isBlank(coding.getSystem())) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] is of type coding, but none of code, system, and display are populated", linkId);
continue;
} else if (isBlank(coding.getCode()) && isBlank(coding.getSystem())) {
if (type != QuestionnaireItemType.OPENCHOICE) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] is of type only has a display populated (no code or system) but question does not allow {1}", linkId, QuestionnaireItemType.OPENCHOICE.name());
continue;
}
} else if (isBlank(coding.getCode()) || isBlank(coding.getSystem())) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Answer to question with linkId[{0}] has a coding, but this coding does not contain a code and system (both must be present, or neither as the question allows {1})", linkId, QuestionnaireItemType.OPENCHOICE.name());
continue;
}
String optionsRef = theQuestion.getOptions().getReference();
if (isNotBlank(optionsRef)) {
ValueSet valueSet = getValueSet(theResponse, theQuestion.getOptions());
if (valueSet == null) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Question with linkId[{0}] has options ValueSet[{1}] but this ValueSet can not be found", linkId, optionsRef);
continue;
}
boolean found = false;
if (coding.getSystem().equals(valueSet.getCodeSystem().getSystem())) {
for (ConceptDefinitionComponent next : valueSet.getCodeSystem().getConcept()) {
if (coding.getCode().equals(next.getCode())) {
found = true;
break;
}
}
}
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, found, "Question with linkId[{0}] has answer with system[{1}] and code[{2}] but this is not a valid answer for ValueSet[{3}]", linkId, coding.getSystem(), coding.getCode(), optionsRef);
}
}
}
validateItems(theErrors, theQuestion.getItem(), nextAnswer.getItem(), thePathStack, theResponse, theValidateRequired);
} finally {
thePathStack.removeLast();
}
} // for answers
}
private Set<Class<? extends Type>> determineAllowedAnswerTypes(QuestionnaireItemType type) {
Set<Class<? extends Type>> allowedAnswerTypes;
switch (type) {
case ATTACHMENT:
allowedAnswerTypes = allowedTypes(Attachment.class);
break;
case BOOLEAN:
allowedAnswerTypes = allowedTypes(BooleanType.class);
break;
case CHOICE:
allowedAnswerTypes = allowedTypes(Coding.class);
break;
case DATE:
allowedAnswerTypes = allowedTypes(DateType.class);
break;
case DATETIME:
allowedAnswerTypes = allowedTypes(DateTimeType.class);
break;
case DECIMAL:
allowedAnswerTypes = allowedTypes(DecimalType.class);
break;
case INSTANT:
allowedAnswerTypes = allowedTypes(InstantType.class);
break;
case INTEGER:
allowedAnswerTypes = allowedTypes(IntegerType.class);
break;
case OPENCHOICE:
allowedAnswerTypes = allowedTypes(Coding.class, StringType.class);
break;
case QUANTITY:
allowedAnswerTypes = allowedTypes(Quantity.class);
break;
case REFERENCE:
allowedAnswerTypes = allowedTypes(Reference.class);
break;
case STRING:
allowedAnswerTypes = allowedTypes(StringType.class);
break;
case TEXT:
allowedAnswerTypes = allowedTypes(StringType.class);
break;
case TIME:
allowedAnswerTypes = allowedTypes(TimeType.class);
break;
case URL:
allowedAnswerTypes = allowedTypes(UriType.class);
break;
case NULL:
default:
allowedAnswerTypes = Collections.emptySet();
}
return allowedAnswerTypes;
}
}

View File

@ -29,15 +29,22 @@ POSSIBILITY OF SUCH DAMAGE.
package org.hl7.fhir.utilities.xml;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.utilities.Utilities;
@ -381,9 +388,18 @@ public class XMLUtil {
children.add(c);
c = getNextSibling(c);
}
}
public static void getNamedChildrenWithTails(Element focus, String name, List<Element> children, Set<String> typeTails) {
Element c = getFirstChild(focus);
while (c != null) {
String n = c.getLocalName() != null ? c.getLocalName() : c.getNodeName();
if (n.equals(name) || (!n.equals("responseCode") && (n.startsWith(name) && typeTails.contains(n.substring(name.length())))))
children.add(c);
c = getNextSibling(c);
}
}
public static boolean hasNamedChild(Element e, String name) {
Element c = getFirstChild(e);
while (c != null && !name.equals(c.getLocalName()) && !name.equals(c.getNodeName()))
@ -426,5 +442,13 @@ public class XMLUtil {
return e == null ? null : e.getAttribute(aname);
}
public static void writeDomToFile(Document doc, String filename) throws TransformerException {
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
DOMSource source = new DOMSource(doc);
StreamResult streamResult = new StreamResult(new File(filename));
transformer.transform(source, streamResult);
}
}

View File

@ -10,12 +10,14 @@ resource.Binary=org.hl7.fhir.dstu3.model.Binary
resource.BodySite=org.hl7.fhir.dstu3.model.BodySite
resource.Bundle=org.hl7.fhir.dstu3.model.Bundle
resource.CarePlan=org.hl7.fhir.dstu3.model.CarePlan
resource.CareTeam=org.hl7.fhir.dstu3.model.CareTeam
resource.Claim=org.hl7.fhir.dstu3.model.Claim
resource.ClaimResponse=org.hl7.fhir.dstu3.model.ClaimResponse
resource.ClinicalImpression=org.hl7.fhir.dstu3.model.ClinicalImpression
resource.CodeSystem=org.hl7.fhir.dstu3.model.CodeSystem
resource.Communication=org.hl7.fhir.dstu3.model.Communication
resource.CommunicationRequest=org.hl7.fhir.dstu3.model.CommunicationRequest
resource.CompartmentDefinition=org.hl7.fhir.dstu3.model.CompartmentDefinition
resource.Composition=org.hl7.fhir.dstu3.model.Composition
resource.ConceptMap=org.hl7.fhir.dstu3.model.ConceptMap
resource.Condition=org.hl7.fhir.dstu3.model.Condition
@ -49,6 +51,7 @@ resource.Goal=org.hl7.fhir.dstu3.model.Goal
resource.Group=org.hl7.fhir.dstu3.model.Group
resource.GuidanceResponse=org.hl7.fhir.dstu3.model.GuidanceResponse
resource.HealthcareService=org.hl7.fhir.dstu3.model.HealthcareService
resource.ImagingExcerpt=org.hl7.fhir.dstu3.model.ImagingExcerpt
resource.ImagingObjectSelection=org.hl7.fhir.dstu3.model.ImagingObjectSelection
resource.ImagingStudy=org.hl7.fhir.dstu3.model.ImagingStudy
resource.Immunization=org.hl7.fhir.dstu3.model.Immunization
@ -59,6 +62,7 @@ resource.Linkage=org.hl7.fhir.dstu3.model.Linkage
resource.List=org.hl7.fhir.dstu3.model.ListResource
resource.Location=org.hl7.fhir.dstu3.model.Location
resource.Measure=org.hl7.fhir.dstu3.model.Measure
resource.MeasureReport=org.hl7.fhir.dstu3.model.MeasureReport
resource.Media=org.hl7.fhir.dstu3.model.Media
resource.Medication=org.hl7.fhir.dstu3.model.Medication
resource.MedicationAdministration=org.hl7.fhir.dstu3.model.MedicationAdministration
@ -67,7 +71,6 @@ resource.MedicationOrder=org.hl7.fhir.dstu3.model.MedicationOrder
resource.MedicationStatement=org.hl7.fhir.dstu3.model.MedicationStatement
resource.MessageHeader=org.hl7.fhir.dstu3.model.MessageHeader
resource.ModuleDefinition=org.hl7.fhir.dstu3.model.ModuleDefinition
resource.ModuleMetadata=org.hl7.fhir.dstu3.model.ModuleMetadata
resource.NamingSystem=org.hl7.fhir.dstu3.model.NamingSystem
resource.NutritionOrder=org.hl7.fhir.dstu3.model.NutritionOrder
resource.Observation=org.hl7.fhir.dstu3.model.Observation
@ -83,6 +86,7 @@ resource.PaymentNotice=org.hl7.fhir.dstu3.model.PaymentNotice
resource.PaymentReconciliation=org.hl7.fhir.dstu3.model.PaymentReconciliation
resource.Person=org.hl7.fhir.dstu3.model.Person
resource.Practitioner=org.hl7.fhir.dstu3.model.Practitioner
resource.PractitionerRole=org.hl7.fhir.dstu3.model.PractitionerRole
resource.Procedure=org.hl7.fhir.dstu3.model.Procedure
resource.ProcedureRequest=org.hl7.fhir.dstu3.model.ProcedureRequest
resource.ProcessRequest=org.hl7.fhir.dstu3.model.ProcessRequest
@ -100,14 +104,17 @@ resource.Sequence=org.hl7.fhir.dstu3.model.Sequence
resource.Slot=org.hl7.fhir.dstu3.model.Slot
resource.Specimen=org.hl7.fhir.dstu3.model.Specimen
resource.StructureDefinition=org.hl7.fhir.dstu3.model.StructureDefinition
resource.StructureMap=org.hl7.fhir.dstu3.model.StructureMap
resource.Subscription=org.hl7.fhir.dstu3.model.Subscription
resource.Substance=org.hl7.fhir.dstu3.model.Substance
resource.SupplyDelivery=org.hl7.fhir.dstu3.model.SupplyDelivery
resource.SupplyRequest=org.hl7.fhir.dstu3.model.SupplyRequest
resource.Task=org.hl7.fhir.dstu3.model.Task
resource.TestScript=org.hl7.fhir.dstu3.model.TestScript
resource.ValueSet=org.hl7.fhir.dstu3.model.ValueSet
resource.VisionPrescription=org.hl7.fhir.dstu3.model.VisionPrescription
datatype.ActionDefinition=org.hl7.fhir.dstu3.model.ActionDefinition
datatype.Address=org.hl7.fhir.dstu3.model.Address
datatype.Age=org.hl7.fhir.dstu3.model.Age
datatype.Annotation=org.hl7.fhir.dstu3.model.Annotation
@ -116,6 +123,7 @@ datatype.CodeableConcept=org.hl7.fhir.dstu3.model.CodeableConcept
datatype.Coding=org.hl7.fhir.dstu3.model.Coding
datatype.ContactPoint=org.hl7.fhir.dstu3.model.ContactPoint
datatype.Count=org.hl7.fhir.dstu3.model.Count
datatype.DataRequirement=org.hl7.fhir.dstu3.model.DataRequirement
datatype.Distance=org.hl7.fhir.dstu3.model.Distance
datatype.Duration=org.hl7.fhir.dstu3.model.Duration
datatype.ElementDefinition=org.hl7.fhir.dstu3.model.ElementDefinition
@ -123,8 +131,10 @@ datatype.Extension=org.hl7.fhir.dstu3.model.Extension
datatype.HumanName=org.hl7.fhir.dstu3.model.HumanName
datatype.Identifier=org.hl7.fhir.dstu3.model.Identifier
datatype.Meta=org.hl7.fhir.dstu3.model.Meta
datatype.ModuleMetadata=org.hl7.fhir.dstu3.model.ModuleMetadata
datatype.Money=org.hl7.fhir.dstu3.model.Money
datatype.Narrative=org.hl7.fhir.dstu3.model.Narrative
datatype.ParameterDefinition=org.hl7.fhir.dstu3.model.ParameterDefinition
datatype.Period=org.hl7.fhir.dstu3.model.Period
datatype.Quantity=org.hl7.fhir.dstu3.model.Quantity
datatype.Range=org.hl7.fhir.dstu3.model.Range
@ -134,6 +144,7 @@ datatype.SampledData=org.hl7.fhir.dstu3.model.SampledData
datatype.Signature=org.hl7.fhir.dstu3.model.Signature
datatype.SimpleQuantity=org.hl7.fhir.dstu3.model.SimpleQuantity
datatype.Timing=org.hl7.fhir.dstu3.model.Timing
datatype.TriggerDefinition=org.hl7.fhir.dstu3.model.TriggerDefinition
datatype.base64binary=org.hl7.fhir.dstu3.model.Base64BinaryType
datatype.boolean=org.hl7.fhir.dstu3.model.BooleanType
datatype.code=org.hl7.fhir.dstu3.model.CodeType

View File

@ -135,7 +135,7 @@ public class DefaultThymeleafNarrativeGeneratorDstu3Test {
obs.setValue(new Quantity(null, 2.223, null, null, "mg/L"));
obs.addReferenceRange().setLow((SimpleQuantity) new SimpleQuantity().setValue(2.20)).setHigh((SimpleQuantity) new SimpleQuantity().setValue(2.99));
obs.setStatus(ObservationStatus.FINAL);
obs.setComments("This is a result comment");
obs.setComment("This is a result comment");
Reference result = value.addResult();
result.setResource(obs);

View File

@ -603,9 +603,9 @@ public class XmlParserDstu3Test {
@Test
public void testEncodeAndReEncodeContainedJson() {
Composition comp = new Composition();
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section2_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section2_Allergy0")));
IParser parser = ourCtx.newJsonParser().setPrettyPrint(true);
@ -628,9 +628,9 @@ public class XmlParserDstu3Test {
@Test
public void testEncodeAndReEncodeContainedXml() {
Composition comp = new Composition();
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().setNote(new Annotation().setText("Section2_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section0_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section1_Allergy0")));
comp.addSection().addEntry().setResource(new AllergyIntolerance().addNote(new Annotation().setText("Section2_Allergy0")));
IParser parser = ourCtx.newXmlParser().setPrettyPrint(true);
@ -1728,9 +1728,6 @@ public class XmlParserDstu3Test {
assertThat(output, containsString("http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset"));
ourLog.info("Expected: {}", input);
ourLog.info("Actual : {}", output);
assertEquals(input, output);
}
@Test

View File

@ -23,19 +23,20 @@ import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.hapi.validation.DefaultProfileValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport.CodeValidationResult;
import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.CodeType;
import org.hl7.fhir.dstu3.model.Observation;
import org.hl7.fhir.dstu3.model.Observation.ObservationStatus;
import org.hl7.fhir.dstu3.model.Patient;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.StructureDefinition;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Observation.ObservationStatus;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptDefinitionComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionComponent;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
@ -141,14 +142,22 @@ public class FhirInstanceValidatorDstu3Test {
return retVal;
}
});
when(myMockSupport.fetchCodeSystem(any(FhirContext.class), any(String.class))).thenAnswer(new Answer<ValueSet>() {
when(myMockSupport.fetchCodeSystem(any(FhirContext.class), any(String.class))).thenAnswer(new Answer<CodeSystem>() {
@Override
public ValueSet answer(InvocationOnMock theInvocation) throws Throwable {
ValueSet retVal = myDefaultValidationSupport.fetchCodeSystem((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]);
public CodeSystem answer(InvocationOnMock theInvocation) throws Throwable {
CodeSystem retVal = myDefaultValidationSupport.fetchCodeSystem((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]);
ourLog.info("fetchCodeSystem({}) : {}", new Object[] { (String) theInvocation.getArguments()[1], retVal });
return retVal;
}
});
when(myMockSupport.fetchStructureDefinition(any(FhirContext.class), any(String.class))).thenAnswer(new Answer<StructureDefinition>() {
@Override
public StructureDefinition answer(InvocationOnMock theInvocation) throws Throwable {
StructureDefinition retVal = myDefaultValidationSupport.fetchStructureDefinition((FhirContext) theInvocation.getArguments()[0], (String) theInvocation.getArguments()[1]);
ourLog.info("fetchStructureDefinition({}) : {}", new Object[] { (String) theInvocation.getArguments()[1], retVal });
return retVal;
}
});
}
@ -271,9 +280,7 @@ public class FhirInstanceValidatorDstu3Test {
ValidationResult output = myVal.validateWithResult(input);
logResultsAndReturnAll(output);
assertEquals(output.toString(), 3, output.getMessages().size());
ourLog.info(output.getMessages().get(0).getLocationString());
ourLog.info(output.getMessages().get(0).getMessage());
assertThat(output.getMessages().toString(), containsString("Items not of type group should not have items - Item with linkId 5.1 of type BOOLEAN has 1 item(s)"));
}
@Test
@ -303,28 +310,7 @@ public class FhirInstanceValidatorDstu3Test {
}
/**
* See #216
*/
@Test
public void testValidateRawXmlInvalidChoiceName() throws Exception {
String input = IOUtils.toString(FhirInstanceValidator.class.getResourceAsStream("/medicationstatement_invalidelement.xml"));
ValidationResult output = myVal.validateWithResult(input);
List<SingleValidationMessage> res = logResultsAndReturnAll(output);
ourLog.info(res.toString());
for (SingleValidationMessage nextMessage : res) {
if (nextMessage.getSeverity() == ResultSeverityEnum.ERROR) {
fail(nextMessage.toString());
}
}
// TODO: we should really not have any errors at all here, but for
// now we aren't validating snomed codes correctly
// assertEquals(output.toString(), 0, res.size());
}
@Test
public void testValidateResourceContainingProfileDeclarationDoesntResolve() {

View File

@ -13,22 +13,26 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.dstu3.hapi.validation.DefaultProfileValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.FhirInstanceValidator;
import org.hl7.fhir.dstu3.hapi.validation.HapiWorkerContext;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.hapi.validation.ValidationSupportChain;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.IntegerType;
import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.Type;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.utils.IWorkerContext;
import org.hl7.fhir.dstu3.validation.QuestionnaireResponseValidator;
import org.hl7.fhir.dstu3.validation.ValidationMessage;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
@ -38,18 +42,34 @@ public class QuestionnaireResponseValidatorDstu3Test {
private static final FhirContext ourCtx = FhirContext.forDstu3();
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(QuestionnaireResponseValidatorDstu3Test.class);
private QuestionnaireResponseValidator myVal;
private IWorkerContext myWorkerCtx;
private IValidationSupport myValSupport;
private FhirValidator myVal;
private FhirInstanceValidator myInstanceVal;
@Before
public void before() {
myValSupport = mock(IValidationSupport.class);
// new DefaultProfileValidationSupport();
myWorkerCtx = new HapiWorkerContext(ourCtx, myValSupport);
myVal = new QuestionnaireResponseValidator(myWorkerCtx);
myVal = ourCtx.newValidator();
myVal.setValidateAgainstStandardSchema(false);
myVal.setValidateAgainstStandardSchematron(false);
ValidationSupportChain validationSupport = new ValidationSupportChain(myValSupport, myDefaultValidationSupport);
myInstanceVal = new FhirInstanceValidator(validationSupport);
myVal.registerValidatorModule(myInstanceVal);
}
private static DefaultProfileValidationSupport myDefaultValidationSupport = new DefaultProfileValidationSupport();
@AfterClass
public static void afterClass() {
myDefaultValidationSupport.flush();
myDefaultValidationSupport = null;
}
@Test
@ -58,16 +78,16 @@ public class QuestionnaireResponseValidatorDstu3Test {
q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.BOOLEAN);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] found of type [StringType] but this is invalid for question of type [boolean]"));
assertThat(errors.toString(), containsString("Answer value must be of type boolean"));
}
@Test
@ -78,43 +98,55 @@ public class QuestionnaireResponseValidatorDstu3Test {
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setOptions(new Reference("http://somevalueset"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq("http://example.com/Questionnaire/q1"))).thenReturn(q);
CodeSystem codeSystem = new CodeSystem();
codeSystem.setUrl("http://codesystems.com/system");
codeSystem.addConcept().setCode("code0");
when(myValSupport.fetchResource(any(FhirContext.class), eq(CodeSystem.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem);
CodeSystem codeSystem2 = new CodeSystem();
codeSystem2.setUrl("http://codesystems.com/system2");
codeSystem2.addConcept().setCode("code2");
when(myValSupport.fetchResource(any(FhirContext.class), eq(CodeSystem.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2);
ValueSet options = new ValueSet();
options.getCodeSystem().setSystem("urn:system").addConcept().setCode("code0");
options.getCompose().addInclude().setSystem("urn:system2").addConcept().setCode("code2");
options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0");
options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2");
when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options);
QuestionnaireResponse qa;
List<ValidationMessage> errors;
ValidationResult errors;
// Good code
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code0"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
assertEquals(errors.toString(), 0, errors.size());
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://codesystems.com/system").setCode("code0"));
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
assertEquals(errors.toString(), 0, errors.getMessages().size());
// Bad code
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code1"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://codesystems.com/system").setCode("code1"));
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("message=Question with linkId[link0] has answer with system[urn:system] and code[code1] but this is not a valid answer for ValueSet[http://somevalueset]"));
assertThat(errors.toString(), containsString("The value provided (http://codesystems.com/system::code1) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system2").setCode("code3"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://codesystems.com/system2").setCode("code3"));
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("message=Question with linkId[link0] has answer with system[urn:system2] and code[code3] but this is not a valid answer for ValueSet[http://somevalueset]"));
assertThat(errors.toString(), containsString("The value provided (http://codesystems.com/system2::code3) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
}
@ -123,108 +155,127 @@ public class QuestionnaireResponseValidatorDstu3Test {
String questionnaireRef = "http://example.com/Questionnaire/q1";
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.OPENCHOICE).setOptions(new Reference("http://somevalueset"));
QuestionnaireItemComponent item = q.addItem();
item.setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.OPENCHOICE).setOptions(new Reference("http://somevalueset"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(questionnaireRef))).thenReturn(q);
CodeSystem codeSystem = new CodeSystem();
codeSystem.setUrl("http://codesystems.com/system");
codeSystem.addConcept().setCode("code0");
when(myValSupport.fetchResource(any(FhirContext.class), eq(CodeSystem.class), eq("http://codesystems.com/system"))).thenReturn(codeSystem);
CodeSystem codeSystem2 = new CodeSystem();
codeSystem2.setUrl("http://codesystems.com/system2");
codeSystem2.addConcept().setCode("code2");
when(myValSupport.fetchResource(any(FhirContext.class), eq(CodeSystem.class), eq("http://codesystems.com/system2"))).thenReturn(codeSystem2);
ValueSet options = new ValueSet();
options.getCodeSystem().setSystem("urn:system").addConcept().setCode("code0");
options.getCompose().addInclude().setSystem("http://codesystems.com/system").addConcept().setCode("code0");
options.getCompose().addInclude().setSystem("http://codesystems.com/system2").addConcept().setCode("code2");
when(myValSupport.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq("http://somevalueset"))).thenReturn(options);
QuestionnaireResponse qa;
List<ValidationMessage> errors;
ValidationResult errors;
// Good code
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code0"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
assertEquals(errors.toString(), 0, errors.size());
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://codesystems.com/system").setCode("code0"));
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
assertEquals(errors.toString(), 0, errors.getMessages().size());
// Bad code
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code1"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://codesystems.com/system").setCode("code1"));
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("message=Question with linkId[link0] has answer with system[urn:system] and code[code1] but this is not a valid answer for ValueSet[http://somevalueset]"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("The value provided (http://codesystems.com/system::code1) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
// Partial code
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem(null).setCode("code1"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] has a coding, but this coding does not contain a code and system (both must be present, or neither as the question allows OPENCHOICE)"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("The value provided (null::code1) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("").setCode("code1"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
errors = myVal.validateWithResult(qa);
errors = stripBindingHasNoSourceMessage(errors);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] has a coding, but this coding does not contain a code and system (both must be present, or neither as the question allows OPENCHOICE)"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("The value provided (null::code1) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("system").setCode(null));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("http://system").setCode(null));
errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] has a coding, but this coding does not contain a code and system (both must be present, or neither as the question allows OPENCHOICE)"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("system").setCode(null));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] has a coding, but this coding does not contain a code and system (both must be present, or neither as the question allows OPENCHOICE)"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("The value provided (http://system::null) is not in the options value set in the questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
// Wrong type
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new IntegerType(123));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("message=Answer to question with linkId[link0] found of type [IntegerType] but this is invalid for question of type [open-choice]"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("Cannot validate integer answer option because no option list is provided"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item/f:answer"));
// String answer
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("Hello"));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setDisplay("Hello"));
errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors, empty());
assertThat(errors.getMessages(), empty());
// Missing String answer
qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType(""));
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setDisplay(""));
errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Answer to question with linkId[link0] has no value but this item is required"));
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(errors.toString(), containsString("No response answer found for required item link0"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse/f:item"));
}
private ValidationResult stripBindingHasNoSourceMessage(ValidationResult theErrors) {
List<SingleValidationMessage> messages = new ArrayList<SingleValidationMessage>(theErrors.getMessages());
for (int i = 0; i < messages.size(); i++) {
if (messages.get(i).getMessage().contains("has no source, so can't")) {
messages.remove(i);
i--;
}
}
return new ValidationResult(ourCtx, messages);
}
@Test
public void testGroupWithNoLinkIdInQuestionnaireResponse() {
Questionnaire q = new Questionnaire();
@ -232,16 +283,16 @@ public class QuestionnaireResponseValidatorDstu3Test {
qGroup.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.BOOLEAN);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
QuestionnaireResponseItemComponent qaGroup = qa.addItem();
qaGroup.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Questionnaire definition contains group with no linkId"));
assertThat(errors.toString(), containsString("No LinkId, so can't be validated"));
}
@Test
@ -256,12 +307,12 @@ public class QuestionnaireResponseValidatorDstu3Test {
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
String reference = qa.getQuestionnaire().getReference();
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(reference))).thenReturn(q);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("Missing required question with linkId[link0]"));
assertThat(errors.toString(), containsString("No response found for required item link0"));
}
@Test
@ -272,17 +323,17 @@ public class QuestionnaireResponseValidatorDstu3Test {
qGroup.addItem().setLinkId("link1").setType(QuestionnaireItemType.STRING);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
QuestionnaireResponseItemComponent qaGroup = qa.addItem().setLinkId("link0");
qaGroup.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("definition contains item with no type"));
assertEquals(1, errors.size());
assertThat(errors.toString(), containsString("Definition for item link0 does not contain a type"));
assertEquals(1, errors.getMessages().size());
}
@Test
@ -291,16 +342,16 @@ public class QuestionnaireResponseValidatorDstu3Test {
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.BOOLEAN);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link1").addAnswer().setValue(new StringType("FOO"));
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)"));
assertThat(errors.toString(), containsString("message=Item with linkId[link1] found at this position, but this item does not exist at this position in Questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse"));
assertThat(errors.toString(), containsString("LinkId \"link1\" not found in questionnaire"));
}
@Test
@ -309,16 +360,16 @@ public class QuestionnaireResponseValidatorDstu3Test {
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.BOOLEAN);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link1").addItem().setLinkId("link2");
when(myValSupport.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(qa.getQuestionnaire().getReference()))).thenReturn(q);
List<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
ValidationResult errors = myVal.validateWithResult(qa);
ourLog.info(errors.toString());
assertThat(errors.toString(), containsString("location=//QuestionnaireResponse/item(0)"));
assertThat(errors.toString(), containsString("Item with linkId[link1] found at this position, but this item does not exist at this position in Questionnaire"));
assertThat(errors.toString(), containsString("/f:QuestionnaireResponse"));
assertThat(errors.toString(), containsString("LinkId \"link1\" not found in questionnaire"));
}
// @Test
@ -326,9 +377,8 @@ public class QuestionnaireResponseValidatorDstu3Test {
String input = IOUtils.toString(QuestionnaireResponseValidatorDstu3Test.class.getResourceAsStream("/questionnaireanswers-0f431c50ddbe4fff8e0dd6b7323625fc.xml"));
QuestionnaireResponse qa = ourCtx.newXmlParser().parseResource(QuestionnaireResponse.class, input);
ArrayList<ValidationMessage> errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
assertEquals(errors.toString(), 0, errors.size());
ValidationResult errors = myVal.validateWithResult(qa);
assertEquals(errors.toString(), 0, errors.getMessages().size());
/*
* Now change a coded value
@ -353,9 +403,8 @@ public class QuestionnaireResponseValidatorDstu3Test {
//@formatter:on
qa = ourCtx.newXmlParser().parseResource(QuestionnaireResponse.class, input);
errors = new ArrayList<ValidationMessage>();
myVal.validate(errors, qa);
assertEquals(errors.toString(), 10, errors.size());
errors = myVal.validateWithResult(qa);
assertEquals(errors.toString(), 10, errors.getMessages().size());
}
}

View File

@ -1,206 +0,0 @@
package ca.uhn.fhir.validation;
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.hl7.fhir.dstu3.hapi.validation.FhirQuestionnaireResponseValidator;
import org.hl7.fhir.dstu3.hapi.validation.IValidationSupport;
import org.hl7.fhir.dstu3.model.Coding;
import org.hl7.fhir.dstu3.model.IntegerType;
import org.hl7.fhir.dstu3.model.Questionnaire;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse;
import org.hl7.fhir.dstu3.model.Reference;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.ValueSet;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent;
import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType;
import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus;
import org.junit.Before;
import org.junit.Test;
import ca.uhn.fhir.context.FhirContext;
public class QuestionnaireResponseValidatorIntegrationDstu3Test {
private static final FhirContext ourCtx = FhirContext.forDstu3();
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(QuestionnaireResponseValidatorIntegrationDstu3Test.class);
private IValidationSupport myResourceLoaderMock;
private FhirValidator myVal;
@Before
public void before() {
myResourceLoaderMock = mock(IValidationSupport.class);
FhirQuestionnaireResponseValidator qaVal = new FhirQuestionnaireResponseValidator();
qaVal.setValidationSupport(myResourceLoaderMock);
myVal = ourCtx.newValidator();
myVal.setValidateAgainstStandardSchema(false);
myVal.setValidateAgainstStandardSchematron(false);
myVal.registerValidatorModule(qaVal);
}
@Test
public void testAnswerWithWrongType() {
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.BOOLEAN);
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(("http://example.com/Questionnaire/q1")))).thenReturn(q);
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link0").addAnswer().setValue(new StringType("FOO"));
ValidationResult result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("Answer to question with linkId[link0] found of type [StringType] but this is invalid for question of type [boolean]"));
}
@Test
public void testRequiredOnlyTestedForFinishedQuestionnaires() {
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(true).setType(QuestionnaireItemType.BOOLEAN);
QuestionnaireItemComponent qg = q.addItem().setLinkId("link1").setRequired(true).setType(QuestionnaireItemType.GROUP);
qg.addItem().setLinkId("link2").setRequired(false).setType(QuestionnaireItemType.BOOLEAN);
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(("http://example.com/Questionnaire/q1")))).thenReturn(q);
// Wrong type
{
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.addItem().setLinkId("link0").addAnswer().setValue(new IntegerType(123));
ValidationResult result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("Answer to question with linkId[link0] found of type [IntegerType] but this is invalid for question of type [boolean]"));
}
// Not populated, no status
{
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
ValidationResult result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("myMessage=Missing required group with linkId[link1],mySeverity=information"));
}
// Not populated, partial status
{
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.setStatus(QuestionnaireResponseStatus.INPROGRESS);
ValidationResult result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("myMessage=Missing required group with linkId[link1],mySeverity=information"));
}
// Not populated, finished status
{
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("http://example.com/Questionnaire/q1");
qa.setStatus(QuestionnaireResponseStatus.COMPLETED);
ValidationResult result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("Missing required group with linkId[link1],mySeverity=error"));
}
}
@Test
public void testCodedAnswer() {
String questionnaireRef = "http://example.com/Questionnaire/q1";
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setOptions(new Reference("http://somevalueset/ValueSet/123"));
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(("http://example.com/Questionnaire/q1")))).thenReturn(q);
ValueSet options = new ValueSet();
options.getCodeSystem().setSystem("urn:system").addConcept().setCode("code0");
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(("http://somevalueset/ValueSet/123")))).thenReturn(options);
QuestionnaireResponse qa;
// Good code
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code0"));
ValidationResult result = myVal.validateWithResult(qa);
assertEquals(result.getMessages().toString(), 0, result.getMessages().size());
// Bad code
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code1"));
result = myVal.validateWithResult(qa);
ourLog.info(result.getMessages().toString());
assertThat(result.getMessages().toString(), containsString("myLocationString=//QuestionnaireResponse/item(0)/answer(0)"));
assertThat(result.getMessages().toString(), containsString("myMessage=Question with linkId[link0] has answer with system[urn:system] and code[code1] but this is not a valid answer for ValueSet[http://somevalueset/ValueSet/123]"));
result.toOperationOutcome();
}
@Test
public void testInvalidReference() {
QuestionnaireResponse qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("someReference"); // not relative
ValidationResult result = myVal.validateWithResult(qa);
assertEquals(result.getMessages().toString(), 1, result.getMessages().size());
assertThat(result.getMessages().toString(), containsString("Questionnaire someReference is not found"));
}
@Test
public void testUnknownValueSet() {
String questionnaireRef = "http://example.com/Questionnaire/q1";
Questionnaire q = new Questionnaire();
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setOptions(new Reference("http://somevalueset/ValueSet/123"));
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(Questionnaire.class), eq(("http://example.com/Questionnaire/q1")))).thenReturn(q);
when(myResourceLoaderMock.fetchResource(any(FhirContext.class), eq(ValueSet.class), eq(("http://somevalueset/ValueSet/123")))).thenReturn(null);
QuestionnaireResponse qa;
// Bad code
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference(questionnaireRef);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code1"));
ValidationResult result = myVal.validateWithResult(qa);
assertThat(result.getMessages().toString(), containsString("but this ValueSet can not be found"));
}
@Test
public void testContainedQuestionnaireAndValueSet() {
ValueSet vs = new ValueSet();
vs.getCodeSystem().setSystem("urn:system").addConcept().setCode("code1");
vs.setId("#VVV");
Questionnaire q = new Questionnaire();
q.setId("#QQQ");
Reference vsRef = new Reference("#VVV");
vsRef.setResource(vs);
q.addItem().setLinkId("link0").setRequired(false).setType(QuestionnaireItemType.CHOICE).setOptions(vsRef);
QuestionnaireResponse qa;
// Bad code
qa = new QuestionnaireResponse();
qa.getQuestionnaire().setReference("#QQQ");
qa.getQuestionnaire().setResource(q);
qa.addItem().setLinkId("link0").addAnswer().setValue(new Coding().setSystem("urn:system").setCode("code1"));
ValidationResult result = myVal.validateWithResult(qa);
assertEquals(result.getMessages().toString(), 0, result.getMessages().size());
}
}

View File

@ -73,19 +73,19 @@
"linkId":"2.1",
"text":"Overall Image Quality:",
"type":"choice",
"option":[
{
"option":[{
"valueCoding":{
"code":"2.1a",
"display":"Adequate"
},
{
}},
{"valueCoding":{
"code":"2.1b",
"display":"Suboptimal"
},
{
}},
{"valueCoding":{
"code":"2.1c",
"display":"Non-diagnostic"
}
}}
]
},
{
@ -150,18 +150,18 @@
"text":"Location of main nodule/mass:",
"type":"choice",
"option":[
{
{"valueCoding":{
"code":"3.1.1a",
"display":"Peripheral"
},
{
}},
{"valueCoding":{
"code":"3.1.1b",
"display":"Central*"
},
{
}},
{"valueCoding":{
"code":"3.1.1c",
"display":"Both*"
}
}}
],
"item":[
{
@ -279,18 +279,18 @@
"text":"Size of the nodule/mass:",
"type":"choice",
"option":[
{
{"valueCoding":{
"code":"3.2.1a",
"display":"Solid nodule/mass"
},
{
}},
{"valueCoding":{
"code":"3.2.1b",
"display":"Part-solid nodule/mass"
},
{
}},
{"valueCoding":{
"code":"3.2.1c",
"display":"Pure Ground glass"
}
}}
],
"item":[
{

View File

@ -1,804 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Account"/>
<meta>
<lastUpdated value="2016-01-20T08:16:20.857-05:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJBSURBVDjLhdKxa5NBGMfx713yvkmbJnaoFiSF4mJTh06Kg4OgiyCCRXCof4YIdXdxFhQVHPo3OFSoUx0FySQttaVKYq2NbdO8ed/L3fM4JG3tYPvAcfBw9+HHPWdUlf/V0tLSqKo+EpEHInJFRIohhDUR+RBCeDM7O7ua55QSkRfVanVufHyckZERrLV0Op2Zra2tmXq9fg+YsmcAdyYnJykUCke9OI6ZmJgghHAZ4KwE3ntPs9mkVCohIjQaDWq1GiEEAM5KoHEcY62lVCrRarUoFotUKpUjIL/y/uqXYmV62ph/LSVrr30P4bEFcM4B0Ov1jk547/uAUTs1ceNdZIwB7V/GGHz6+9LXxY96eDiEgHMOY8xJAK8p4grZz5cElwNbwZgyxYu3EFM01lriOCZJEqIoIooiALIsGwA9Y1UcwcWoKNLdpLu9zvbnBWqNBhuvn5EDUmB0EH/1E2TZw5U+YLQovkun+Ytsaw1xCbnCOap334LC7s4Oe/ttvA+ICLmhMXRxDufczUECS37oAuevPwUEVFFp4/eXkXSdYc2IopSepnjtUh5/wg9gfn6+OQBUNaRIUkfDHhraSLoBKqikIF3yHJDLHaAkFOLciVHnyVAVj/S2Ub/XRyQD9aAZKgkaOohvo6ENgykcA07VEFDfQv1uf4W9Y8y30bCPhg4qKZJtMnjTPqBO/vhkZ7h3EJeRslWNQMqgY2jIAIfa/m5sIKSpqpPsGEiz599e3b+GchtD+bSvjQJm2SG6cNj6C+QmaxAek5tyAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/>
<span title="Account : A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc.">Account</span>
<a name="Account"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="domainresource.html">DomainResource</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.identifier : Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number).">identifier</span>
<a name="Account.identifier"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Identifier">Identifier</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Account number</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Account.name : Name used for the account when displaying it to humans in reports, etc.">name</span>
<a name="Account.name"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Human-readable label</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.type : Categorizes the account for reporting and searching purposes.">type</span>
<a name="Account.type"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#CodeableConcept">CodeableConcept</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">E.g. patient, expense, depreciation</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Account.status : Indicates whether the account is presently used/useable or not.">status</span>
<a name="Account.status"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">active | inactive
<br/>
<a href="valueset-account-status.html" title="Indicates whether the account is available to be used.">AccountStatus</a> (
<a href="terminologies.html#preferred" title="Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.">Preferred</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.activePeriod : Indicates the period of time over which the account is allowed.">activePeriod</span>
<a name="Account.activePeriod"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Period">Period</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Valid from..to</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.currency : Identifies the currency to which transactions must be converted when crediting or debiting the account.">currency</span>
<a name="Account.currency"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Coding">Coding</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Base currency in which balance is tracked
<br/>
<a href="http://www.iso.org/iso/home/standards/currency_codes" title="The monetary currency in which this account records values.">AccountCurrency</a> (
<a href="terminologies.html#example" title="Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included.">Example</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.balance : Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative.">balance</span>
<a name="Account.balance"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Money">Money</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">How much is in account?</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Account.coveragePeriod : Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc.">coveragePeriod</span>
<a name="Account.coveragePeriod"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Period">Period</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Transaction window</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="Account.subject : Identifies the patient, device, practitioner, location or other object the account is associated with.">subject</span>
<a name="Account.subject"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="patient.html">Patient</a> |
<a href="device.html">Device</a> |
<a href="practitioner.html">Practitioner</a> |
<a href="location.html">Location</a> |
<a href="healthcareservice.html">HealthcareService</a> |
<a href="organization.html">Organization</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">What is account tied to?</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="Account.owner : Indicates the organization, department, etc. with responsibility for the account.">owner</span>
<a name="Account.owner"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="organization.html">Organization</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Who is responsible?</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Account.description : Provides additional information about what the account tracks and how it is used.">description</span>
<a name="Account.description"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Explanation of purpose/use</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="0"/>
</extension>
<url value="http://hl7.org/fhir/StructureDefinition/Account"/>
<name value="Account"/>
<status value="draft"/>
<publisher value="Health Level Seven International (Patient Administration)"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<contact>
<telecom>
<system value="other"/>
<value value="http://www.hl7.org/Special/committees/pafm/index.cfm"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Account Resource"/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
<snapshot>
<element>
<path value="Account"/>
<definition value="A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc."/>
<alias value="Cost center"/>
<alias value="Record"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="financial.support"/>
</mapping>
</element>
<element>
<path value="Account.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Meta"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
<comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
</element>
<element>
<path value="Account.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
</element>
<element>
<path value="Account.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
<condition value="dom-1"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element>
<path value="Account.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Account.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Account.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Account.identifier"/>
<short value="Account number"/>
<definition value="Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.name"/>
<short value="Human-readable label"/>
<definition value="Name used for the account when displaying it to humans in reports, etc."/>
<alias value="Title"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.type"/>
<short value="E.g. patient, expense, depreciation"/>
<definition value="Categorizes the account for reporting and searching purposes."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="The usage type of this account, permits categorization of accounts."/>
</binding>
</element>
<element>
<path value="Account.status"/>
<short value="active | inactive"/>
<definition value="Indicates whether the account is presently used/useable or not."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="preferred"/>
<description value="Indicates whether the account is available to be used."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/account-status"/>
</valueSetReference>
</binding>
</element>
<element>
<path value="Account.activePeriod"/>
<short value="Valid from..to"/>
<definition value="Indicates the period of time over which the account is allowed."/>
<comments value="Transactions cannot typically be posted to account outside of its &quot;active&quot; period."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.currency"/>
<short value="Base currency in which balance is tracked"/>
<definition value="Identifies the currency to which transactions must be converted when crediting or debiting the account."/>
<comments value="Tracked separately from balance because currency might be known when balance is not. In some cases, balance might be expressed in a currency other than the base currency for the account."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Coding"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="The monetary currency in which this account records values."/>
<valueSetUri value="http://www.iso.org/iso/home/standards/currency_codes"/>
</binding>
</element>
<element>
<path value="Account.balance"/>
<short value="How much is in account?"/>
<definition value="Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Money"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.coveragePeriod"/>
<short value="Transaction window"/>
<definition value="Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc."/>
<comments value="It is possible for transactions relevant to a coverage period to be posted to the account before or after the coverage period."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.subject"/>
<short value="What is account tied to?"/>
<definition value="Identifies the patient, device, practitioner, location or other object the account is associated with."/>
<alias value="target"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Device"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.owner"/>
<short value="Who is responsible?"/>
<definition value="Indicates the organization, department, etc. with responsibility for the account."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.description"/>
<short value="Explanation of purpose/use"/>
<definition value="Provides additional information about what the account tracks and how it is used."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
</element>
</snapshot>
<differential>
<element>
<path value="Account"/>
<definition value="A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc."/>
<alias value="Cost center"/>
<alias value="Record"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="w5"/>
<map value="financial.support"/>
</mapping>
</element>
<element>
<path value="Account.identifier"/>
<short value="Account number"/>
<definition value="Unique identifier used to reference the account. May or may not be intended for human use (e.g. credit card number)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.name"/>
<short value="Human-readable label"/>
<definition value="Name used for the account when displaying it to humans in reports, etc."/>
<alias value="Title"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.type"/>
<short value="E.g. patient, expense, depreciation"/>
<definition value="Categorizes the account for reporting and searching purposes."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="The usage type of this account, permits categorization of accounts."/>
</binding>
</element>
<element>
<path value="Account.status"/>
<short value="active | inactive"/>
<definition value="Indicates whether the account is presently used/useable or not."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="preferred"/>
<description value="Indicates whether the account is available to be used."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/account-status"/>
</valueSetReference>
</binding>
</element>
<element>
<path value="Account.activePeriod"/>
<short value="Valid from..to"/>
<definition value="Indicates the period of time over which the account is allowed."/>
<comments value="Transactions cannot typically be posted to account outside of its &quot;active&quot; period."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.currency"/>
<short value="Base currency in which balance is tracked"/>
<definition value="Identifies the currency to which transactions must be converted when crediting or debiting the account."/>
<comments value="Tracked separately from balance because currency might be known when balance is not. In some cases, balance might be expressed in a currency other than the base currency for the account."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Coding"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="The monetary currency in which this account records values."/>
<valueSetUri value="http://www.iso.org/iso/home/standards/currency_codes"/>
</binding>
</element>
<element>
<path value="Account.balance"/>
<short value="How much is in account?"/>
<definition value="Represents the sum of all credits less all debits associated with the account. Might be positive, zero or negative."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Quantity"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Money"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.coveragePeriod"/>
<short value="Transaction window"/>
<definition value="Identifies the period of time the account applies to; e.g. accounts created per fiscal year, quarter, etc."/>
<comments value="It is possible for transactions relevant to a coverage period to be posted to the account before or after the coverage period."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.subject"/>
<short value="What is account tied to?"/>
<definition value="Identifies the patient, device, practitioner, location or other object the account is associated with."/>
<alias value="target"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Device"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.owner"/>
<short value="Who is responsible?"/>
<definition value="Indicates the organization, department, etc. with responsibility for the account."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Organization"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Account.description"/>
<short value="Explanation of purpose/use"/>
<definition value="Provides additional information about what the account tracks and how it is used."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
</element>
</differential>
</StructureDefinition>

View File

@ -1,939 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Address"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#Address" title="Address : There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world.">Address</a>
<a name="Address"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">A postal address</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.use" title="Address.use : The purpose of this address.">use</a>
<a name="Address.use"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">home | work | temp | old - purpose of this address
<br/>
<a href="valueset-address-use.html" title="The use of an address">AddressUse</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.type" title="Address.type : Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both.">type</a>
<a name="Address.type"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">postal | physical | both
<br/>
<a href="valueset-address-type.html" title="The type of an address (physical / postal)">AddressType</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.text" title="Address.text : A full text representation of the address.">text</a>
<a name="Address.text"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Text representation of the address</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.line" title="Address.line : This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information.">line</a>
<a name="Address.line"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Street name, number, direction &amp; P.O. Box etc.</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.city" title="Address.city : The name of the city, town, village or other community or delivery center.">city</a>
<a name="Address.city"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Name of city, town etc.</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.district" title="Address.district : The name of the administrative area (county).">district</a>
<a name="Address.district"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">District name (aka county)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.state" title="Address.state : Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).">state</a>
<a name="Address.state"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Sub-unit of country (abbreviations ok)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.postalCode" title="Address.postalCode : A postal code designating a region defined by the postal service.">postalCode</a>
<a name="Address.postalCode"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Postal code for area</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.country" title="Address.country : Country - a nation as commonly understood or generally accepted.">country</a>
<a name="Address.country"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Country (can be ISO 3166 3 letter code)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Address.period" title="Address.period : Time period when address was/is in use.">period</a>
<a name="Address.period"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Period">Period</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Time period when address was/is in use</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Address"/>
<name value="Address"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Address Type"/>
<requirements value="Need to be able to record postal addresses, along with notes about their use."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="servd"/>
<uri value="http://www.omg.org/spec/ServD/1.0/"/>
<name value="ServD"/>
</mapping>
<mapping>
<identity value="vcard"/>
<uri value="http://w3.org/vcard"/>
<name value="vCard"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="Address"/>
<short value="A postal address"/>
<definition value="There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."/>
<comments value="Note: address is for postal addresses, not physical locations."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="Address"/>
</mapping>
</element>
<element>
<path value="Address.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Address.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Address.use"/>
<short value="home | work | temp | old - purpose of this address"/>
<definition value="The purpose of this address."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old address etc.for a current/permanent one. Applications can assume that an address is current unless it explicitly says that it is temporary or old."/>
<requirements value="Allows an appropriate address to be chosen from a list of many."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="home"/>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The use of an address"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/address-use"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XAD.7"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./AddressPurpose"/>
</mapping>
</element>
<element>
<path value="Address.type"/>
<short value="postal | physical | both"/>
<definition value="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="both"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The type of an address (physical / postal)"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/address-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XAD.18"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="address type parameter"/>
</mapping>
</element>
<element>
<path value="Address.text"/>
<short value="Text representation of the address"/>
<definition value="A full text representation of the address."/>
<comments value="Can provide both a text representation and parts."/>
<requirements value="A renderable, unencoded form."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="137 Nowhere Street, Erewhon 9132"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./formatted"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="address label parameter"/>
</mapping>
</element>
<element>
<path value="Address.line"/>
<short value="Street name, number, direction &amp; P.O. Box etc."/>
<definition value="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information."/>
<requirements value="home | work | temp | old - purpose of this address."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="string"/>
</type>
<exampleString value="137 Nowhere Street"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = AL]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="street"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StreetAddress (newline delimitted)"/>
</mapping>
</element>
<element>
<path value="Address.city"/>
<short value="Name of city, town etc."/>
<definition value="The name of the city, town, village or other community or delivery center."/>
<alias value="Municpality"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Erewhon"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CTY]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="locality"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Jurisdiction"/>
</mapping>
</element>
<element>
<path value="Address.district"/>
<short value="District name (aka county)"/>
<definition value="The name of the administrative area (county)."/>
<comments value="District is sometimes known as county, but in some regions &#39;county&#39; is used in place of city (municipality), so county name should be conveyed in city instead."/>
<alias value="County"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Madison"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.9"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CNT | CPA]"/>
</mapping>
</element>
<element>
<path value="Address.state"/>
<short value="Sub-unit of country (abbreviations ok)"/>
<definition value="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)."/>
<alias value="Province"/>
<alias value="Territory"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.4"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = STA]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="region"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Region"/>
</mapping>
</element>
<element>
<path value="Address.postalCode"/>
<short value="Postal code for area"/>
<definition value="A postal code designating a region defined by the postal service."/>
<alias value="Zip"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="9132"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = ZIP]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="code"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./PostalIdentificationCode"/>
</mapping>
</element>
<element>
<path value="Address.country"/>
<short value="Country (can be ISO 3166 3 letter code)"/>
<definition value="Country - a nation as commonly understood or generally accepted."/>
<comments value="ISO 3166 3 letter codes can be used in place of a full country name."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CNT]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="country"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Country"/>
</mapping>
</element>
<element>
<path value="Address.period"/>
<short value="Time period when address was/is in use"/>
<definition value="Time period when address was/is in use."/>
<requirements value="Allows addresses to be placed in historical context."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<examplePeriod>
<start value="2010-03-23"/>
<end value="2010-07-01"/>
</examplePeriod>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.12 / XAD.13 + XAD.14"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./usablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Address"/>
<short value="A postal address"/>
<definition value="There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."/>
<comments value="Note: address is for postal addresses, not physical locations."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="Address"/>
</mapping>
</element>
<element>
<path value="Address.use"/>
<short value="home | work | temp | old - purpose of this address"/>
<definition value="The purpose of this address."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old address etc.for a current/permanent one. Applications can assume that an address is current unless it explicitly says that it is temporary or old."/>
<requirements value="Allows an appropriate address to be chosen from a list of many."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="home"/>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The use of an address"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/address-use"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XAD.7"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./AddressPurpose"/>
</mapping>
</element>
<element>
<path value="Address.type"/>
<short value="postal | physical | both"/>
<definition value="Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="both"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The type of an address (physical / postal)"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/address-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XAD.18"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="address type parameter"/>
</mapping>
</element>
<element>
<path value="Address.text"/>
<short value="Text representation of the address"/>
<definition value="A full text representation of the address."/>
<comments value="Can provide both a text representation and parts."/>
<requirements value="A renderable, unencoded form."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="137 Nowhere Street, Erewhon 9132"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.1 + XAD.2 + XAD.3 + XAD.4 + XAD.5 + XAD.6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./formatted"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="address label parameter"/>
</mapping>
</element>
<element>
<path value="Address.line"/>
<short value="Street name, number, direction &amp; P.O. Box etc."/>
<definition value="This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information."/>
<requirements value="home | work | temp | old - purpose of this address."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="string"/>
</type>
<exampleString value="137 Nowhere Street"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = AL]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="street"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StreetAddress (newline delimitted)"/>
</mapping>
</element>
<element>
<path value="Address.city"/>
<short value="Name of city, town etc."/>
<definition value="The name of the city, town, village or other community or delivery center."/>
<alias value="Municpality"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Erewhon"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CTY]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="locality"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Jurisdiction"/>
</mapping>
</element>
<element>
<path value="Address.district"/>
<short value="District name (aka county)"/>
<definition value="The name of the administrative area (county)."/>
<comments value="District is sometimes known as county, but in some regions &#39;county&#39; is used in place of city (municipality), so county name should be conveyed in city instead."/>
<alias value="County"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Madison"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.9"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CNT | CPA]"/>
</mapping>
</element>
<element>
<path value="Address.state"/>
<short value="Sub-unit of country (abbreviations ok)"/>
<definition value="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)."/>
<alias value="Province"/>
<alias value="Territory"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.4"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = STA]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="region"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Region"/>
</mapping>
</element>
<element>
<path value="Address.postalCode"/>
<short value="Postal code for area"/>
<definition value="A postal code designating a region defined by the postal service."/>
<alias value="Zip"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="9132"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = ZIP]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="code"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./PostalIdentificationCode"/>
</mapping>
</element>
<element>
<path value="Address.country"/>
<short value="Country (can be ISO 3166 3 letter code)"/>
<definition value="Country - a nation as commonly understood or generally accepted."/>
<comments value="ISO 3166 3 letter codes can be used in place of a full country name."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="AD.part[parttype = CNT]"/>
</mapping>
<mapping>
<identity value="vcard"/>
<map value="country"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Country"/>
</mapping>
</element>
<element>
<path value="Address.period"/>
<short value="Time period when address was/is in use"/>
<definition value="Time period when address was/is in use."/>
<requirements value="Allows addresses to be placed in historical context."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<examplePeriod>
<start value="2010-03-23"/>
<end value="2010-07-01"/>
</examplePeriod>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XAD.12 / XAD.13 + XAD.14"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./usablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,284 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Age"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<h2>Data type Age</h2>
<p>A duration (length of time) with a UCUM code</p>
<h3>Rule</h3>
<p>There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive.</p>
<p>XPath:</p>
<blockquote>
<pre>(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value=&#39;http://unitsofmeasure.org&#39;) and not(contains(f:value/@value, &#39;-&#39;))</pre>
</blockquote>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Age"/>
<name value="Age"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="A duration (length of time) with a UCUM code"/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<constrainedType value="Quantity"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Quantity"/>
<snapshot>
<element>
<path value="Quantity"/>
<name value="Age"/>
<short value="A duration (length of time) with a UCUM code"/>
<definition value="There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive."/>
<comments value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Quantity"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Quantity"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="code.empty() or system"/>
</extension>
<key value="qty-3"/>
<severity value="error"/>
<human value="If a code for the unit is present, the system SHALL also be present"/>
<xpath value="not(exists(f:code)) or exists(f:system)"/>
</constraint>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value.contains(&#39;.&#39;).not())"/>
</extension>
<key value="age-1"/>
<severity value="error"/>
<human value="There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive."/>
<xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value=&#39;http://unitsofmeasure.org&#39;) and not(contains(f:value/@value, &#39;-&#39;))"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="SN (see also Range) or CQ"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values"/>
</mapping>
</element>
<element>
<path value="Quantity.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Quantity.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="Quantity.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Quantity.value"/>
<short value="Numerical value (with implicit precision)"/>
<definition value="The value of the measured amount. The value includes an implicit precision in the presentation of the value."/>
<comments value="The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)."/>
<requirements value="Precision is handled implicitly in almost all cases of measurement."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.value"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="decimal"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="SN.2 / CQ - N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"/>
</mapping>
</element>
<element>
<path value="Quantity.comparator"/>
<short value="&lt; | &lt;= | &gt;= | &gt; - how to understand the value"/>
<definition value="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value."/>
<requirements value="Need a framework for handling measures where the value is &lt;5ug/L or &gt;400mg/L due to the limitations of measuring methodology."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.comparator"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<meaningWhenMissing value="If there is no comparator, then there is no modification of the value"/>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="How the Quantity should be understood and represented."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/quantity-comparator"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="SN.1 / CQ.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="IVL properties"/>
</mapping>
</element>
<element>
<path value="Quantity.unit"/>
<short value="Unit representation"/>
<definition value="A human-readable form of the unit."/>
<requirements value="There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.unit"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.unit"/>
</mapping>
</element>
<element>
<path value="Quantity.system"/>
<short value="System that defines coded unit form"/>
<definition value="The identification of the system that provides the coded form of the unit."/>
<requirements value="Need to know the system that defines the coded form of the unit."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.system"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<condition value="qty-3"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CO.codeSystem, PQ.translation.codeSystem"/>
</mapping>
</element>
<element>
<path value="Quantity.code"/>
<short value="Coded form of the unit"/>
<definition value="A computer processable form of the unit in some unit representation system."/>
<comments value="The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system."/>
<requirements value="Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.code"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.code, MO.currency, PQ.translation.code"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Quantity"/>
<name value="Age"/>
<short value="A duration (length of time) with a UCUM code"/>
<definition value="There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Quantity"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="(code or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value.contains(&#39;.&#39;).not())"/>
</extension>
<key value="age-1"/>
<severity value="error"/>
<human value="There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive."/>
<xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value=&#39;http://unitsofmeasure.org&#39;) and not(contains(f:value/@value, &#39;-&#39;))"/>
</constraint>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

View File

@ -1,389 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Annotation"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#Annotation" title="Annotation : A text note which also contains information about who made the statement and when.">Annotation</a>
<a name="Annotation"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Text node with attribution</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAGm6/idTd4yTmF+v8Xa37KvW+lyh3KHJ62aq41ee2bXZ98nm/2mt5W2Ck5XN/C1chEZieho8WXXA/2Gn4P39/W+y6V+l3qjP8Njt/lx2izxPYGyv51Oa1EJWZ////////yH5BAEAAB8ALAAAAAAQABAAAAWH4Cd+Xml6Y0pCQts0EKp6GbYshaM/skhjhCChUmFIeL4OsHIxXRAISQTl6SgIG8+FgfBMoh2qtbLZQr0TQJhk3TC4pYPBApiyFVDEwSOf18UFXxMWBoUJBn9sDgmDewcJCRyJJBoEkRyYmAABPZQEAAOhA5seFDMaDw8BAQ9TpiokJyWwtLUhADs=" alt="." style="background-color: white; background-color: inherit" title="Choice of Types" class="hierarchy"/>
<a href="datatypes-definitions.html#Annotation.author_x_" title="Annotation.author[x] : The individual responsible for making the annotation.">author[x]</a>
<a name="Annotation.author_x_"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Individual responsible for the annotation</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAMElEQVR42u3QwQkAMAwDsezq/WdoskKgFAoy6HkfV5LamJ1tc7MHAAD+5QQAAOCZBkurQFbnaRSlAAAAAElFTkSuQmCC)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzMPbYccAgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAMElEQVQ4y+3OQREAIBDDwAv+PQcFFN5MIyCzqHMKUGVCpMFLK97heq+gggoq+EiwAVjvMhFGmlEUAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/> authorReference
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="practitioner.html">Practitioner</a> |
<a href="patient.html">Patient</a> |
<a href="relatedperson.html">RelatedPerson</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzMPbYccAgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAMElEQVQ4y+3OQREAIBDDwAv+PQcFFN5MIyCzqHMKUGVCpMFLK97heq+gggoq+EiwAVjvMhFGmlEUAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="A sequence of Unicode characters">authorString</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Annotation.time" title="Annotation.time : Indicates when this particular annotation was made.">time</a>
<a name="Annotation.time"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#dateTime">dateTime</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">When the annotation was made</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Annotation.text" title="Annotation.text : The text of the annotation.">text</a>
<a name="Annotation.text"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">The annotation - text content</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Annotation"/>
<name value="Annotation"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Annotation Type"/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="Annotation"/>
<short value="Text node with attribution"/>
<definition value="A text note which also contains information about who made the statement and when."/>
<comments value="For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.
This element may need to be included in narrative because of the potential for modifying information.
*Annotations SHOULD NOT* be used to communicate &quot;modifying&quot; information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act"/>
</mapping>
</element>
<element>
<path value="Annotation.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Annotation.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Annotation.author[x]"/>
<short value="Individual responsible for the annotation"/>
<definition value="The individual responsible for making the annotation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.participant[typeCode=AUT].role"/>
</mapping>
</element>
<element>
<path value="Annotation.time"/>
<short value="When the annotation was made"/>
<definition value="Indicates when this particular annotation was made."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="dateTime"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.effectiveTime"/>
</mapping>
</element>
<element>
<path value="Annotation.text"/>
<short value="The annotation - text content"/>
<definition value="The text of the annotation."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.text"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Annotation"/>
<short value="Text node with attribution"/>
<definition value="A text note which also contains information about who made the statement and when."/>
<comments value="For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.
This element may need to be included in narrative because of the potential for modifying information.
*Annotations SHOULD NOT* be used to communicate &quot;modifying&quot; information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act"/>
</mapping>
</element>
<element>
<path value="Annotation.author[x]"/>
<short value="Individual responsible for the annotation"/>
<definition value="The individual responsible for making the annotation."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.participant[typeCode=AUT].role"/>
</mapping>
</element>
<element>
<path value="Annotation.time"/>
<short value="When the annotation was made"/>
<definition value="Indicates when this particular annotation was made."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="dateTime"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.effectiveTime"/>
</mapping>
</element>
<element>
<path value="Annotation.text"/>
<short value="The annotation - text content"/>
<definition value="The text of the annotation."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="Act.text"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,793 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="AppointmentResponse"/>
<meta>
<lastUpdated value="2016-01-20T08:16:20.857-05:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJBSURBVDjLhdKxa5NBGMfx713yvkmbJnaoFiSF4mJTh06Kg4OgiyCCRXCof4YIdXdxFhQVHPo3OFSoUx0FySQttaVKYq2NbdO8ed/L3fM4JG3tYPvAcfBw9+HHPWdUlf/V0tLSqKo+EpEHInJFRIohhDUR+RBCeDM7O7ua55QSkRfVanVufHyckZERrLV0Op2Zra2tmXq9fg+YsmcAdyYnJykUCke9OI6ZmJgghHAZ4KwE3ntPs9mkVCohIjQaDWq1GiEEAM5KoHEcY62lVCrRarUoFotUKpUjIL/y/uqXYmV62ph/LSVrr30P4bEFcM4B0Ov1jk547/uAUTs1ceNdZIwB7V/GGHz6+9LXxY96eDiEgHMOY8xJAK8p4grZz5cElwNbwZgyxYu3EFM01lriOCZJEqIoIooiALIsGwA9Y1UcwcWoKNLdpLu9zvbnBWqNBhuvn5EDUmB0EH/1E2TZw5U+YLQovkun+Ytsaw1xCbnCOap334LC7s4Oe/ttvA+ICLmhMXRxDufczUECS37oAuevPwUEVFFp4/eXkXSdYc2IopSepnjtUh5/wg9gfn6+OQBUNaRIUkfDHhraSLoBKqikIF3yHJDLHaAkFOLciVHnyVAVj/S2Ub/XRyQD9aAZKgkaOohvo6ENgykcA07VEFDfQv1uf4W9Y8y30bCPhg4qKZJtMnjTPqBO/vhkZ7h3EJeRslWNQMqgY2jIAIfa/m5sIKSpqpPsGEiz599e3b+GchtD+bSvjQJm2SG6cNj6C+QmaxAek5tyAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/>
<span title="AppointmentResponse : A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.">AppointmentResponse</span>
<a name="AppointmentResponse"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element has or is affected by some invariants">I</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="domainresource.html">DomainResource</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection
<br/>
<span style="font-style: italic" title="apr-1">Either the participantType or actor must be specified</span>
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="AppointmentResponse.identifier : This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.">identifier</span>
<a name="AppointmentResponse.identifier"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Identifier">Identifier</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">External Ids for this item</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="AppointmentResponse.appointment : Appointment that this response is replying to.">appointment</span>
<a name="AppointmentResponse.appointment"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="appointment.html">Appointment</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Appointment this response relates to</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="AppointmentResponse.start : Date/Time that the appointment is to take place, or requested new start time.">start</span>
<a name="AppointmentResponse.start"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#instant">instant</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Time from appointment, or requested new start time</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="AppointmentResponse.end : This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.">end</span>
<a name="AppointmentResponse.end"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#instant">instant</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Time from appointment, or requested new end time</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="AppointmentResponse.participantType : Role of participant in the appointment.">participantType</span>
<a name="AppointmentResponse.participantType"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#CodeableConcept">CodeableConcept</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Role of participant in the appointment
<br/>
<a href="valueset-encounter-participant-type.html" title="Role of participant in encounter.">ParticipantType</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="AppointmentResponse.actor : A Person, Location/HealthcareService or Device that is participating in the appointment.">actor</span>
<a name="AppointmentResponse.actor"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="patient.html">Patient</a> |
<a href="practitioner.html">Practitioner</a> |
<a href="relatedperson.html">RelatedPerson</a> |
<a href="device.html">Device</a> |
<a href="healthcareservice.html">HealthcareService</a> |
<a href="location.html">Location</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Person, Location/HealthcareService or Device</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="AppointmentResponse.participantStatus : Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.">participantStatus</span>
<a name="AppointmentResponse.participantStatus"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">accepted | declined | tentative | in-process | completed | needs-action
<br/>
<a href="valueset-participantstatus.html" title="The Participation status of an appointment.">ParticipantStatus</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="AppointmentResponse.comment : Additional comments about the appointment.">comment</span>
<a name="AppointmentResponse.comment"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Additional comments</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1"/>
</extension>
<url value="http://hl7.org/fhir/StructureDefinition/AppointmentResponse"/>
<name value="AppointmentResponse"/>
<status value="draft"/>
<publisher value="Health Level Seven International (Patient Administration)"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<contact>
<telecom>
<system value="other"/>
<value value="http://www.hl7.org/Special/committees/pafm/index.cfm"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for AppointmentResponse Resource"/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="ical"/>
<uri value="http://www.ietf.org/rfc/rfc2445.txt"/>
<name value="iCalendar"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
<snapshot>
<element>
<path value="AppointmentResponse"/>
<short value="A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection"/>
<definition value="A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="participantType or actor"/>
</extension>
<key value="apr-1"/>
<severity value="error"/>
<human value="Either the participantType or actor must be specified"/>
<xpath value="(exists(f:participantType) or exists(f:actor))"/>
</constraint>
<mapping>
<identity value="ical"/>
<map value="VEVENT"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="workflow.scheduling"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="AppointmentResponse.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Meta"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="AppointmentResponse.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
<comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
</element>
<element>
<path value="AppointmentResponse.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
</element>
<element>
<path value="AppointmentResponse.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
<condition value="dom-1"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.identifier"/>
<short value="External Ids for this item"/>
<definition value="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value=".id"/>
</mapping>
<mapping>
<identity value="ical"/>
<map value="UID"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="id"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.appointment"/>
<short value="Appointment this response relates to"/>
<definition value="Appointment that this response is replying to."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Appointment"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="AppointmentResponse.start"/>
<short value="Time from appointment, or requested new start time"/>
<definition value="Date/Time that the appointment is to take place, or requested new start time."/>
<comments value="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mapping>
<identity value="w5"/>
<map value="when.init"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.end"/>
<short value="Time from appointment, or requested new end time"/>
<definition value="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mapping>
<identity value="w5"/>
<map value="when.done"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.participantType"/>
<short value="Role of participant in the appointment"/>
<definition value="Role of participant in the appointment."/>
<comments value="The role of the participant can be used to declare what the actor will be doing in the scope of the referenced appointment.
If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.
This value MUST be the same as specified on the referenced Appointment so that they can be matched, and subsequently updated."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Role of participant in encounter."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/encounter-participant-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="ical"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.actor"/>
<short value="Person, Location/HealthcareService or Device"/>
<definition value="A Person, Location/HealthcareService or Device that is participating in the appointment."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Device"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="PID-3-Patient ID List"/>
</mapping>
<mapping>
<identity value="ical"/>
<map value="ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.participantStatus"/>
<short value="accepted | declined | tentative | in-process | completed | needs-action"/>
<definition value="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The Participation status of an appointment."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/participantstatus"/>
</valueSetReference>
</binding>
<mapping>
<identity value="ical"/>
<map value="ATTENDEE;CN=&quot;Brian Postlethwaite&quot;;RSVP=TRUE:mailto:BPostlethwaite@data.com (rsvpparam | partstatparam)"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.comment"/>
<short value="Additional comments"/>
<definition value="Additional comments about the appointment."/>
<comments value="This comment is particularly important when the responder is declining, tentatively accepting or requesting another time to indicate the reasons why."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mapping>
<identity value="ical"/>
<map value="COMMENT"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="AppointmentResponse"/>
<short value="A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection"/>
<definition value="A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="participantType or actor"/>
</extension>
<key value="apr-1"/>
<severity value="error"/>
<human value="Either the participantType or actor must be specified"/>
<xpath value="(exists(f:participantType) or exists(f:actor))"/>
</constraint>
<mapping>
<identity value="ical"/>
<map value="VEVENT"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="workflow.scheduling"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.identifier"/>
<short value="External Ids for this item"/>
<definition value="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value=".id"/>
</mapping>
<mapping>
<identity value="ical"/>
<map value="UID"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="id"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.appointment"/>
<short value="Appointment this response relates to"/>
<definition value="Appointment that this response is replying to."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Appointment"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="AppointmentResponse.start"/>
<short value="Time from appointment, or requested new start time"/>
<definition value="Date/Time that the appointment is to take place, or requested new start time."/>
<comments value="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mapping>
<identity value="w5"/>
<map value="when.init"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.end"/>
<short value="Time from appointment, or requested new end time"/>
<definition value="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="instant"/>
</type>
<mapping>
<identity value="w5"/>
<map value="when.done"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.participantType"/>
<short value="Role of participant in the appointment"/>
<definition value="Role of participant in the appointment."/>
<comments value="The role of the participant can be used to declare what the actor will be doing in the scope of the referenced appointment.
If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.
This value MUST be the same as specified on the referenced Appointment so that they can be matched, and subsequently updated."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Role of participant in encounter."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/encounter-participant-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="ical"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.actor"/>
<short value="Person, Location/HealthcareService or Device"/>
<definition value="A Person, Location/HealthcareService or Device that is participating in the appointment."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Device"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="PID-3-Patient ID List"/>
</mapping>
<mapping>
<identity value="ical"/>
<map value="ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.participantStatus"/>
<short value="accepted | declined | tentative | in-process | completed | needs-action"/>
<definition value="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The Participation status of an appointment."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/participantstatus"/>
</valueSetReference>
</binding>
<mapping>
<identity value="ical"/>
<map value="ATTENDEE;CN=&quot;Brian Postlethwaite&quot;;RSVP=TRUE:mailto:BPostlethwaite@data.com (rsvpparam | partstatparam)"/>
</mapping>
</element>
<element>
<path value="AppointmentResponse.comment"/>
<short value="Additional comments"/>
<definition value="Additional comments about the appointment."/>
<comments value="This comment is particularly important when the responder is declining, tentatively accepting or requesting another time to indicate the reasons why."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<mapping>
<identity value="ical"/>
<map value="COMMENT"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,650 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Attachment"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment" title="Attachment : For referring to data content defined in other formats.">Attachment</a>
<a name="Attachment"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ </span>
<span title="This element has or is affected by some invariants">I</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Content in a format defined elsewhere
<br/>
<span style="font-style: italic" title="att-1">It the Attachment has data, it SHALL have a contentType</span>
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.contentType" title="Attachment.contentType : Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.">contentType</a>
<a name="Attachment.contentType"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Mime type of the content, with charset etc.
<br/>
<a href="http://www.rfc-editor.org/bcp/bcp13.txt" title="The mime type of an attachment. Any valid mime type is allowed.">MimeType</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.language" title="Attachment.language : The human language of the content. The value can be any valid value according to BCP 47.">language</a>
<a name="Attachment.language"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Human language of the content (BCP-47)
<br/>
<a href="http://tools.ietf.org/html/bcp47" title="A human language.">Language</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.data" title="Attachment.data : The actual data of the attachment - a sequence of bytes. In XML, represented using base64.">data</a>
<a name="Attachment.data"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#base64Binary">base64Binary</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Data inline, base64ed</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.url" title="Attachment.url : An alternative location where the data can be accessed.">url</a>
<a name="Attachment.url"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#uri">uri</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Uri where the data can be found</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.size" title="Attachment.size : The number of bytes of data that make up this attachment.">size</a>
<a name="Attachment.size"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#unsignedInt">unsignedInt</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Number of bytes of content (if url provided)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.hash" title="Attachment.hash : The calculated hash of the data using SHA-1. Represented using base64.">hash</a>
<a name="Attachment.hash"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#base64Binary">base64Binary</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Hash of the data (sha-1, base64ed)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.title" title="Attachment.title : A label or set of text to display in place of the data.">title</a>
<a name="Attachment.title"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Label to display in place of the data</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Attachment.creation" title="Attachment.creation : The date that the attachment was first created.">creation</a>
<a name="Attachment.creation"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#dateTime">dateTime</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Date attachment was first created</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Attachment"/>
<name value="Attachment"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Attachment Type"/>
<requirements value="Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="Attachment"/>
<short value="Content in a format defined elsewhere"/>
<definition value="For referring to data content defined in other formats."/>
<comments value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as &quot;Attachment&quot;."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="data.empty() or contentType"/>
</extension>
<key value="att-1"/>
<severity value="error"/>
<human value="It the Attachment has data, it SHALL have a contentType"/>
<xpath value="not(exists(f:data)) or exists(f:contentType)"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="ED/RP"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="ED"/>
</mapping>
</element>
<element>
<path value="Attachment.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Attachment.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Attachment.contentType"/>
<short value="Mime type of the content, with charset etc."/>
<definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."/>
<requirements value="Processors of the data need to be able to know how to interpret the data."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="text/plain; charset=UTF-8, image/png"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The mime type of an attachment. Any valid mime type is allowed."/>
<valueSetUri value="http://www.rfc-editor.org/bcp/bcp13.txt"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./mediaType, ./charset"/>
</mapping>
</element>
<element>
<path value="Attachment.language"/>
<short value="Human language of the content (BCP-47)"/>
<definition value="The human language of the content. The value can be any valid value according to BCP 47."/>
<requirements value="Users need to be able to choose between the languages in a set of attachments."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="en-AU"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
<mapping>
<identity value="rim"/>
<map value="./language"/>
</mapping>
</element>
<element>
<path value="Attachment.data"/>
<short value="Data inline, base64ed"/>
<definition value="The actual data of the attachment - a sequence of bytes. In XML, represented using base64."/>
<comments value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON."/>
<requirements value="The data needs to able to be transmitted inline."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="ED.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./data"/>
</mapping>
</element>
<element>
<path value="Attachment.url"/>
<short value="Uri where the data can be found"/>
<definition value="An alternative location where the data can be accessed."/>
<comments value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data."/>
<requirements value="The data needs to be transmitted by reference."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<exampleUri value="http://www.acme.com/logo-small.png"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="RP.1+RP.2 - if they refer to a URL (see v2.6)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./reference/literal"/>
</mapping>
</element>
<element>
<path value="Attachment.size"/>
<short value="Number of bytes of content (if url provided)"/>
<definition value="The number of bytes of data that make up this attachment."/>
<comments value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference."/>
<requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="unsignedInt"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A (needs data type R3 proposal)"/>
</mapping>
</element>
<element>
<path value="Attachment.hash"/>
<short value="Hash of the data (sha-1, base64ed)"/>
<definition value="The calculated hash of the data using SHA-1. Represented using base64."/>
<requirements value="Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value=".integrityCheck[parent::ED/integrityCheckAlgorithm=&quot;SHA-1&quot;]"/>
</mapping>
</element>
<element>
<path value="Attachment.title"/>
<short value="Label to display in place of the data"/>
<definition value="A label or set of text to display in place of the data."/>
<requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Official Corporate Logo"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./title/data"/>
</mapping>
</element>
<element>
<path value="Attachment.creation"/>
<short value="Date attachment was first created"/>
<definition value="The date that the attachment was first created."/>
<requirements value="This is often tracked as an integrity issue for use of the attachment."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="dateTime"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A (needs data type R3 proposal)"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Attachment"/>
<short value="Content in a format defined elsewhere"/>
<definition value="For referring to data content defined in other formats."/>
<comments value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as &quot;Attachment&quot;."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="data.empty() or contentType"/>
</extension>
<key value="att-1"/>
<severity value="error"/>
<human value="It the Attachment has data, it SHALL have a contentType"/>
<xpath value="not(exists(f:data)) or exists(f:contentType)"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="ED/RP"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="ED"/>
</mapping>
</element>
<element>
<path value="Attachment.contentType"/>
<short value="Mime type of the content, with charset etc."/>
<definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."/>
<requirements value="Processors of the data need to be able to know how to interpret the data."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="text/plain; charset=UTF-8, image/png"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The mime type of an attachment. Any valid mime type is allowed."/>
<valueSetUri value="http://www.rfc-editor.org/bcp/bcp13.txt"/>
</binding>
<mapping>
<identity value="v2"/>
<map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./mediaType, ./charset"/>
</mapping>
</element>
<element>
<path value="Attachment.language"/>
<short value="Human language of the content (BCP-47)"/>
<definition value="The human language of the content. The value can be any valid value according to BCP 47."/>
<requirements value="Users need to be able to choose between the languages in a set of attachments."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<exampleCode value="en-AU"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
<mapping>
<identity value="rim"/>
<map value="./language"/>
</mapping>
</element>
<element>
<path value="Attachment.data"/>
<short value="Data inline, base64ed"/>
<definition value="The actual data of the attachment - a sequence of bytes. In XML, represented using base64."/>
<comments value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON."/>
<requirements value="The data needs to able to be transmitted inline."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="ED.5"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./data"/>
</mapping>
</element>
<element>
<path value="Attachment.url"/>
<short value="Uri where the data can be found"/>
<definition value="An alternative location where the data can be accessed."/>
<comments value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data."/>
<requirements value="The data needs to be transmitted by reference."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<exampleUri value="http://www.acme.com/logo-small.png"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="RP.1+RP.2 - if they refer to a URL (see v2.6)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./reference/literal"/>
</mapping>
</element>
<element>
<path value="Attachment.size"/>
<short value="Number of bytes of content (if url provided)"/>
<definition value="The number of bytes of data that make up this attachment."/>
<comments value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference."/>
<requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="unsignedInt"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A (needs data type R3 proposal)"/>
</mapping>
</element>
<element>
<path value="Attachment.hash"/>
<short value="Hash of the data (sha-1, base64ed)"/>
<definition value="The calculated hash of the data using SHA-1. Represented using base64."/>
<requirements value="Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value=".integrityCheck[parent::ED/integrityCheckAlgorithm=&quot;SHA-1&quot;]"/>
</mapping>
</element>
<element>
<path value="Attachment.title"/>
<short value="Label to display in place of the data"/>
<definition value="A label or set of text to display in place of the data."/>
<requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<exampleString value="Official Corporate Logo"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./title/data"/>
</mapping>
</element>
<element>
<path value="Attachment.creation"/>
<short value="Date attachment was first created"/>
<definition value="The date that the attachment was first created."/>
<requirements value="This is often tracked as an integrity issue for use of the attachment."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="dateTime"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A (needs data type R3 proposal)"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,201 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="BackboneElement"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#BackboneElement" title="BackboneElement : Base definition for all elements that are defined inside a resource - but not those in a data type.">BackboneElement</a>
<a name="BackboneElement"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Base for elements defined inside a resource</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADdSURBVDjLY/j//z8DJZhhmBvw41KQ07dzbk5kG/Dtgu/Jb2fsT5JkwI+bqZw/rsfYA21v+XE97f+PS5H/vx5Ra/98QN7+824ZTiIMSJr580bW/x+3iv//etD9/+fdpv/fzwX+/3LY6P/n7TIzCRtwPYYZaPvGH7dKgAb0AA1o/v/tQsh/oO0bP26TZiYqDIB+1/1+wef/z3vN/3/erPr/5aAOyHZdogMRGPIe38/7gvz+Gej3z18OG/8H2u5BvAFn7GO/Htdv/3pAQejzXjkhoO3tH7dIxY7EpEwMBgAr6O5Q8udliwAAAABJRU5ErkJggg==" alt="." style="background-color: white; background-color: inherit" title="Extension" class="hierarchy"/>
<a href="datatypes-definitions.html#BackboneElement.modifierExtension" title="BackboneElement.modifierExtension : May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.">modifierExtension</a>
<a name="BackboneElement.modifierExtension"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="extensibility.html#Extension">Extension</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Extensions that cannot be ignored</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/BackboneElement"/>
<name value="BackboneElement"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for BackboneElement Type"/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<kind value="datatype"/>
<abstract value="true"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="BackboneElement"/>
<short value="Base for elements defined inside a resource"/>
<definition value="Base definition for all elements that are defined inside a resource - but not those in a data type."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="BackboneElement.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="BackboneElement.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="BackboneElement.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="BackboneElement"/>
<short value="Base for elements defined inside a resource"/>
<definition value="Base definition for all elements that are defined inside a resource - but not those in a data type."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="BackboneElement.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,608 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Basic"/>
<meta>
<lastUpdated value="2016-01-20T08:16:20.857-05:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJBSURBVDjLhdKxa5NBGMfx713yvkmbJnaoFiSF4mJTh06Kg4OgiyCCRXCof4YIdXdxFhQVHPo3OFSoUx0FySQttaVKYq2NbdO8ed/L3fM4JG3tYPvAcfBw9+HHPWdUlf/V0tLSqKo+EpEHInJFRIohhDUR+RBCeDM7O7ua55QSkRfVanVufHyckZERrLV0Op2Zra2tmXq9fg+YsmcAdyYnJykUCke9OI6ZmJgghHAZ4KwE3ntPs9mkVCohIjQaDWq1GiEEAM5KoHEcY62lVCrRarUoFotUKpUjIL/y/uqXYmV62ph/LSVrr30P4bEFcM4B0Ov1jk547/uAUTs1ceNdZIwB7V/GGHz6+9LXxY96eDiEgHMOY8xJAK8p4grZz5cElwNbwZgyxYu3EFM01lriOCZJEqIoIooiALIsGwA9Y1UcwcWoKNLdpLu9zvbnBWqNBhuvn5EDUmB0EH/1E2TZw5U+YLQovkun+Ytsaw1xCbnCOap334LC7s4Oe/ttvA+ICLmhMXRxDufczUECS37oAuevPwUEVFFp4/eXkXSdYc2IopSepnjtUh5/wg9gfn6+OQBUNaRIUkfDHhraSLoBKqikIF3yHJDLHaAkFOLciVHnyVAVj/S2Ub/XRyQD9aAZKgkaOohvo6ENgykcA07VEFDfQv1uf4W9Y8y30bCPhg4qKZJtMnjTPqBO/vhkZ7h3EJeRslWNQMqgY2jIAIfa/m5sIKSpqpPsGEiz599e3b+GchtD+bSvjQJm2SG6cNj6C+QmaxAek5tyAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/>
<span title="Basic : Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don&#39;t map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.">Basic</span>
<a name="Basic"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="domainresource.html">DomainResource</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Resource for non-supported content</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Basic.identifier : Identifier assigned to the resource for business purposes, outside the context of FHIR.">identifier</span>
<a name="Basic.identifier"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Identifier">Identifier</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Business identifier</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="Basic.code : Identifies the &#39;type&#39; of resource - equivalent to the resource name for other resources.">code</span>
<a name="Basic.code"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#CodeableConcept">CodeableConcept</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Kind of Resource
<br/>
<a href="valueset-basic-resource-type.html" title="Codes for identifying types of resources not yet defined by FHIR">Basic Resource Types</a> (
<a href="terminologies.html#example" title="Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included.">Example</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="Basic.subject : Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource.">subject</span>
<a name="Basic.subject"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="resourcelist.html">Any</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Identifies the focus of this resource</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="Basic.author : Indicates who was responsible for creating the resource instance.">author</span>
<a name="Basic.author"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="practitioner.html">Practitioner</a> |
<a href="patient.html">Patient</a> |
<a href="relatedperson.html">RelatedPerson</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Who created</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Basic.created : Identifies when the resource was first created.">created</span>
<a name="Basic.created"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#date">date</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">When created</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1"/>
</extension>
<url value="http://hl7.org/fhir/StructureDefinition/Basic"/>
<name value="Basic"/>
<status value="draft"/>
<publisher value="Health Level Seven International (FHIR Infrastructure)"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<contact>
<telecom>
<system value="other"/>
<value value="http://www.hl7.org/Special/committees/fiwg/index.cfm"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Basic Resource"/>
<requirements value="Need some way to safely (without breaking interoperability) allow implementers to exchange content not supported by the initial set of declared resources."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
<snapshot>
<element>
<path value="Basic"/>
<short value="Resource for non-supported content"/>
<definition value="Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don&#39;t map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."/>
<alias value="Z-resource"/>
<alias value="Extension-resource"/>
<alias value="Custom-resource"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="Act, Entity or Role"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="infrastructure.structure"/>
</mapping>
</element>
<element>
<path value="Basic.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Basic.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Meta"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Basic.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
<comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
</element>
<element>
<path value="Basic.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
</element>
<element>
<path value="Basic.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
<condition value="dom-1"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element>
<path value="Basic.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Basic.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Basic.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="Basic.identifier"/>
<short value="Business identifier"/>
<definition value="Identifier assigned to the resource for business purposes, outside the context of FHIR."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./identifier"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="id"/>
</mapping>
</element>
<element>
<path value="Basic.code"/>
<short value="Kind of Resource"/>
<definition value="Identifies the &#39;type&#39; of resource - equivalent to the resource name for other resources."/>
<comments value="Because resource references will only be able to indicate &#39;Basic&#39;, the type of reference will need to be specified in a Profile identified as part of the resource. Refer to the resource notes section for information on appropriate terminologies for this code."/>
<requirements value="Must be able to distinguish different types of &quot;basic&quot; resources."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="Codes for identifying types of resources not yet defined by FHIR"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/basic-resource-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="what"/>
</mapping>
</element>
<element>
<path value="Basic.subject"/>
<short value="Identifies the focus of this resource"/>
<definition value="Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource."/>
<comments value="Optional as not all resources potential resources will have subjects. Resources associated with multiple subjects can handle this via extension."/>
<requirements value="Needed for partitioning the resource by Patient."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SBJ&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who.focus"/>
</mapping>
</element>
<element>
<path value="Basic.author"/>
<short value="Who created"/>
<definition value="Indicates who was responsible for creating the resource instance."/>
<requirements value="Needed for partitioning the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SUB&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who.author"/>
</mapping>
</element>
<element>
<path value="Basic.created"/>
<short value="When created"/>
<definition value="Identifies when the resource was first created."/>
<requirements value="Allows ordering resource instances by time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="date"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;AUT&#39;]/time (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="when.recorded"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Basic"/>
<short value="Resource for non-supported content"/>
<definition value="Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don&#39;t map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."/>
<alias value="Z-resource"/>
<alias value="Extension-resource"/>
<alias value="Custom-resource"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="Act, Entity or Role"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="infrastructure.structure"/>
</mapping>
</element>
<element>
<path value="Basic.identifier"/>
<short value="Business identifier"/>
<definition value="Identifier assigned to the resource for business purposes, outside the context of FHIR."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./identifier"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="id"/>
</mapping>
</element>
<element>
<path value="Basic.code"/>
<short value="Kind of Resource"/>
<definition value="Identifies the &#39;type&#39; of resource - equivalent to the resource name for other resources."/>
<comments value="Because resource references will only be able to indicate &#39;Basic&#39;, the type of reference will need to be specified in a Profile identified as part of the resource. Refer to the resource notes section for information on appropriate terminologies for this code."/>
<requirements value="Must be able to distinguish different types of &quot;basic&quot; resources."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="Codes for identifying types of resources not yet defined by FHIR"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/basic-resource-type"/>
</valueSetReference>
</binding>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="what"/>
</mapping>
</element>
<element>
<path value="Basic.subject"/>
<short value="Identifies the focus of this resource"/>
<definition value="Identifies the patient, practitioner, device or any other resource that is the &quot;focus&quot; of this resource."/>
<comments value="Optional as not all resources potential resources will have subjects. Resources associated with multiple subjects can handle this via extension."/>
<requirements value="Needed for partitioning the resource by Patient."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SBJ&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who.focus"/>
</mapping>
</element>
<element>
<path value="Basic.author"/>
<short value="Who created"/>
<definition value="Indicates who was responsible for creating the resource instance."/>
<requirements value="Needed for partitioning the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;SUB&#39;] (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="who.author"/>
</mapping>
</element>
<element>
<path value="Basic.created"/>
<short value="When created"/>
<definition value="Identifies when the resource was first created."/>
<requirements value="Allows ordering resource instances by time."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="date"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="./participation[typeCode=&#39;AUT&#39;]/time (possibly through a ControlAct and Role)"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="when.recorded"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,290 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Binary"/>
<meta>
<lastUpdated value="2016-01-20T08:16:20.857-05:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJBSURBVDjLhdKxa5NBGMfx713yvkmbJnaoFiSF4mJTh06Kg4OgiyCCRXCof4YIdXdxFhQVHPo3OFSoUx0FySQttaVKYq2NbdO8ed/L3fM4JG3tYPvAcfBw9+HHPWdUlf/V0tLSqKo+EpEHInJFRIohhDUR+RBCeDM7O7ua55QSkRfVanVufHyckZERrLV0Op2Zra2tmXq9fg+YsmcAdyYnJykUCke9OI6ZmJgghHAZ4KwE3ntPs9mkVCohIjQaDWq1GiEEAM5KoHEcY62lVCrRarUoFotUKpUjIL/y/uqXYmV62ph/LSVrr30P4bEFcM4B0Ov1jk547/uAUTs1ceNdZIwB7V/GGHz6+9LXxY96eDiEgHMOY8xJAK8p4grZz5cElwNbwZgyxYu3EFM01lriOCZJEqIoIooiALIsGwA9Y1UcwcWoKNLdpLu9zvbnBWqNBhuvn5EDUmB0EH/1E2TZw5U+YLQovkun+Ytsaw1xCbnCOap334LC7s4Oe/ttvA+ICLmhMXRxDufczUECS37oAuevPwUEVFFp4/eXkXSdYc2IopSepnjtUh5/wg9gfn6+OQBUNaRIUkfDHhraSLoBKqikIF3yHJDLHaAkFOLciVHnyVAVj/S2Ub/XRyQD9aAZKgkaOohvo6ENgykcA07VEFDfQv1uf4W9Y8y30bCPhg4qKZJtMnjTPqBO/vhkZ7h3EJeRslWNQMqgY2jIAIfa/m5sIKSpqpPsGEiz599e3b+GchtD+bSvjQJm2SG6cNj6C+QmaxAek5tyAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/>
<span title="Binary : A binary resource can contain any content, whether text, image, pdf, zip archive, etc.">Binary</span>
<a name="Binary"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="resource.html">Resource</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Pure binary content defined by some other format than FHIR</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Binary.contentType : MimeType of the binary content represented as a standard MimeType (BCP 13).">contentType</span>
<a name="Binary.contentType"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">MimeType of the binary content
<br/>
<a href="http://www.rfc-editor.org/bcp/bcp13.txt" title="The mime type of an attachment. Any valid mime type is allowed.">MimeType</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="Binary.content : The actual content, base64 encoded.">content</span>
<a name="Binary.content"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#base64Binary">base64Binary</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">The actual content</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1"/>
</extension>
<url value="http://hl7.org/fhir/StructureDefinition/Binary"/>
<name value="Binary"/>
<status value="draft"/>
<publisher value="Health Level Seven International (FHIR Infrastructure)"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<contact>
<telecom>
<system value="other"/>
<value value="http://www.hl7.org/Special/committees/fiwg/index.cfm"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Binary Resource"/>
<requirements value="There are situations where it is useful or required to handle pure binary content using the same framework as other resources."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Resource"/>
<snapshot>
<element>
<path value="Binary"/>
<short value="Pure binary content defined by some other format than FHIR"/>
<definition value="A binary resource can contain any content, whether text, image, pdf, zip archive, etc."/>
<comments value="Typically, Binary resources are used for handling content such as: * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="infrastructure.structure"/>
</mapping>
</element>
<element>
<path value="Binary.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Binary.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Meta"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="Binary.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
<comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
</element>
<element>
<path value="Binary.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
</element>
<element>
<path value="Binary.contentType"/>
<short value="MimeType of the binary content"/>
<definition value="MimeType of the binary content represented as a standard MimeType (BCP 13)."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The mime type of an attachment. Any valid mime type is allowed."/>
<valueSetUri value="http://www.rfc-editor.org/bcp/bcp13.txt"/>
</binding>
</element>
<element>
<path value="Binary.content"/>
<short value="The actual content"/>
<definition value="The actual content, base64 encoded."/>
<comments value="If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
</element>
</snapshot>
<differential>
<element>
<path value="Binary"/>
<short value="Pure binary content defined by some other format than FHIR"/>
<definition value="A binary resource can contain any content, whether text, image, pdf, zip archive, etc."/>
<comments value="Typically, Binary resources are used for handling content such as: * CDA Documents (i.e. with XDS) * PDF Documents * Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS)."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="infrastructure.structure"/>
</mapping>
</element>
<element>
<path value="Binary.contentType"/>
<short value="MimeType of the binary content"/>
<definition value="MimeType of the binary content represented as a standard MimeType (BCP 13)."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="The mime type of an attachment. Any valid mime type is allowed."/>
<valueSetUri value="http://www.rfc-editor.org/bcp/bcp13.txt"/>
</binding>
</element>
<element>
<path value="Binary.content"/>
<short value="The actual content"/>
<definition value="The actual content, base64 encoded."/>
<comments value="If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="base64Binary"/>
</type>
<isSummary value="true"/>
</element>
</differential>
</StructureDefinition>

View File

@ -1,601 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="BodySite"/>
<meta>
<lastUpdated value="2016-01-20T08:16:20.857-05:00"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJBSURBVDjLhdKxa5NBGMfx713yvkmbJnaoFiSF4mJTh06Kg4OgiyCCRXCof4YIdXdxFhQVHPo3OFSoUx0FySQttaVKYq2NbdO8ed/L3fM4JG3tYPvAcfBw9+HHPWdUlf/V0tLSqKo+EpEHInJFRIohhDUR+RBCeDM7O7ua55QSkRfVanVufHyckZERrLV0Op2Zra2tmXq9fg+YsmcAdyYnJykUCke9OI6ZmJgghHAZ4KwE3ntPs9mkVCohIjQaDWq1GiEEAM5KoHEcY62lVCrRarUoFotUKpUjIL/y/uqXYmV62ph/LSVrr30P4bEFcM4B0Ov1jk547/uAUTs1ceNdZIwB7V/GGHz6+9LXxY96eDiEgHMOY8xJAK8p4grZz5cElwNbwZgyxYu3EFM01lriOCZJEqIoIooiALIsGwA9Y1UcwcWoKNLdpLu9zvbnBWqNBhuvn5EDUmB0EH/1E2TZw5U+YLQovkun+Ytsaw1xCbnCOap334LC7s4Oe/ttvA+ICLmhMXRxDufczUECS37oAuevPwUEVFFp4/eXkXSdYc2IopSepnjtUh5/wg9gfn6+OQBUNaRIUkfDHhraSLoBKqikIF3yHJDLHaAkFOLciVHnyVAVj/S2Ub/XRyQD9aAZKgkaOohvo6ENgykcA07VEFDfQv1uf4W9Y8y30bCPhg4qKZJtMnjTPqBO/vhkZ7h3EJeRslWNQMqgY2jIAIfa/m5sIKSpqpPsGEiz599e3b+GchtD+bSvjQJm2SG6cNj6C+QmaxAek5tyAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/>
<span title="BodySite : Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case.">BodySite</span>
<a name="BodySite"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="domainresource.html">DomainResource</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Specific and identified anatomical location</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAFxJREFUOE/NjEEOACEIA/0o/38GGw+agoXYeNnDJDCUDnd/gkoFKhWozJiZI3gLwY6rAgxhsPKTPUzycTl8lAryMyMsVQG6TFi6cHULyz8KOjC7OIQKlQpU3uPjAwhX2CCcGsgOAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/>
<span title="BodySite.patient : The person to which the body site belongs.">patient</span>
<a name="BodySite.patient"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">1..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="references.html">Reference</a>(
<a href="patient.html">Patient</a>)
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Patient</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="BodySite.identifier : Identifier for this instance of the anatomical location.">identifier</span>
<a name="BodySite.identifier"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Identifier">Identifier</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Bodysite identifier</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="BodySite.code : Named anatomical location - ideally coded where possible.">code</span>
<a name="BodySite.code"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#CodeableConcept">CodeableConcept</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Named anatomical location
<br/>
<a href="valueset-body-site.html" title="Codes describing anatomical locations. May include laterality">SNOMED CT Body Structures</a> (
<a href="terminologies.html#example" title="Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included.">Example</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="BodySite.modifier : Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane.">modifier</span>
<a name="BodySite.modifier"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#CodeableConcept">CodeableConcept</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Modification to location code
<br/>
<a href="valueset-bodysite-relative-location.html" title="Concepts modifying the anatomic location">Bodysite Location Modifier</a> (
<a href="terminologies.html#example" title="Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included.">Example</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<span title="BodySite.description : Description of anatomical location.">description</span>
<a name="BodySite.description"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">The Description of anatomical location</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<span title="BodySite.image : Image or images used to identify a location.">image</span>
<a name="BodySite.image"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"/>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Attachment">Attachment</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Attached images</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="0"/>
</extension>
<url value="http://hl7.org/fhir/StructureDefinition/BodySite"/>
<name value="BodySite"/>
<status value="draft"/>
<publisher value="Health Level Seven International (Orders and Observations)"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<contact>
<telecom>
<system value="other"/>
<value value="http://www.hl7.org/Special/committees/orders/index.cfm"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for BodySite Resource"/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="openehr"/>
<uri value="http://openehr.org"/>
<name value="Open EHR"/>
</mapping>
<mapping>
<identity value="w5"/>
<uri value="http://hl7.org/fhir/w5"/>
<name value="W5 Mapping"/>
</mapping>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<kind value="resource"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
<snapshot>
<element>
<path value="BodySite"/>
<short value="Specific and identified anatomical location"/>
<definition value="Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."/>
<alias value="anatomical location"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<mapping>
<identity value="openehr"/>
<map value="Archetype ID openEHR-EHR-CLUSTER.anatomical_location.v1 Concept name Anatomical Location Concept description Record details about an anatomical location. Keywords location, site, anatomical Copyright © openEHR Foundation Purpose To record details about anatomical location. Misuse Not for specifiying unilateral/bilateral occurence - this is related to an evaluation which perhaps includes multiple locations. Author Author name: Heather Leslie Organisation: Ocean Informatics Email: heather.leslie@oceaninformatics.com Date of Origination: 2008-11-10 Translator Norwegian Bokmål: Lars Bitsch-Larsen, Haukeland University Hospital of Bergen, Norway, MD, DEAA, MBA, spec in anesthesia, spec in tropical medicine. Arabic (Syria): Mona Saleh Other contributors Heather Leslie, Ocean Informatics, Australia (Editor) Ian McNicoll, freshEHR Clinical Informatics, United Kingdom (Editor) Dunmail Hodkinson, Black Pear Software Ltd, UK References Use cases: - 5LICS, midclavicular line - L forearm, 2cm anterior to the cubital fossa - Right iliac fossa - 5 cm below L tibial tuberosity - 2 cm medial to R nipple - 4 cm below R costal margin in midclavicular line - R femur - midline nose - medial aspect of R great toe nail."/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="clinical.diagnostics"/>
</mapping>
</element>
<element>
<path value="BodySite.id"/>
<short value="Logical id of this artifact"/>
<definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
<comments value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="BodySite.meta"/>
<short value="Metadata about the resource"/>
<definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Meta"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="BodySite.implicitRules"/>
<short value="A set of rules under which this content was created"/>
<definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content."/>
<comments value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
</element>
<element>
<path value="BodySite.language"/>
<short value="Language of the resource content"/>
<definition value="The base language in which the resource is written."/>
<comments value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<description value="A human language."/>
<valueSetUri value="http://tools.ietf.org/html/bcp47"/>
</binding>
</element>
<element>
<path value="BodySite.text"/>
<short value="Text summary of the resource, for human interpretation"/>
<definition value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
<comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative."/>
<alias value="narrative"/>
<alias value="html"/>
<alias value="xhtml"/>
<alias value="display"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Narrative"/>
</type>
<condition value="dom-1"/>
<mapping>
<identity value="rim"/>
<map value="Act.text?"/>
</mapping>
</element>
<element>
<path value="BodySite.contained"/>
<short value="Contained, inline Resources"/>
<definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
<comments value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again."/>
<alias value="inline resources"/>
<alias value="anonymous resources"/>
<alias value="contained resources"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Resource"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="BodySite.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="BodySite.modifierExtension"/>
<short value="Extensions that cannot be ignored"/>
<definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<isModifier value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element>
<path value="BodySite.patient"/>
<short value="Patient"/>
<definition value="The person to which the body site belongs."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="BodySite.identifier"/>
<short value="Bodysite identifier"/>
<definition value="Identifier for this instance of the anatomical location."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="openehr"/>
<map value="Specific location Cluster Optional (0..1) Cardinality: Mandatory, repeating, unordered (1..*)"/>
</mapping>
</element>
<element>
<path value="BodySite.code"/>
<short value="Named anatomical location"/>
<definition value="Named anatomical location - ideally coded where possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="Codes describing anatomical locations. May include laterality"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/body-site"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="OBX-20"/>
</mapping>
<mapping>
<identity value="openehr"/>
<map value="Name of location"/>
</mapping>
</element>
<element>
<path value="BodySite.modifier"/>
<short value="Modification to location code"/>
<definition value="Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="CodeableConcept"/>
</type>
<binding>
<strength value="example"/>
<description value="Concepts modifying the anatomic location"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/bodysite-relative-location"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="No distinct element defined in V2.x. The IHE Radiology Technical Framework directs the use of OBR-15-specimen source to contain laterality for imaging studies."/>
</mapping>
<mapping>
<identity value="openehr"/>
<map value="Combines Side, Numerical identifier, Anatomical plane,and Aspect"/>
</mapping>
</element>
<element>
<path value="BodySite.description"/>
<short value="The Description of anatomical location"/>
<definition value="Description of anatomical location."/>
<comments value="This Description could include any visual markings used to orientate the viewer e.g. external reference points, special sutures, ink markings."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="openehr"/>
<map value="Description of anatomical location/Visual markings/orientation"/>
</mapping>
</element>
<element>
<path value="BodySite.image"/>
<short value="Attached images"/>
<definition value="Image or images used to identify a location."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Attachment"/>
</type>
<mapping>
<identity value="openehr"/>
<map value="Image"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="BodySite"/>
<short value="Specific and identified anatomical location"/>
<definition value="Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."/>
<alias value="anatomical location"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="DomainResource"/>
</type>
<mapping>
<identity value="openehr"/>
<map value="Archetype ID openEHR-EHR-CLUSTER.anatomical_location.v1 Concept name Anatomical Location Concept description Record details about an anatomical location. Keywords location, site, anatomical Copyright © openEHR Foundation Purpose To record details about anatomical location. Misuse Not for specifiying unilateral/bilateral occurence - this is related to an evaluation which perhaps includes multiple locations. Author Author name: Heather Leslie Organisation: Ocean Informatics Email: heather.leslie@oceaninformatics.com Date of Origination: 2008-11-10 Translator Norwegian Bokmål: Lars Bitsch-Larsen, Haukeland University Hospital of Bergen, Norway, MD, DEAA, MBA, spec in anesthesia, spec in tropical medicine. Arabic (Syria): Mona Saleh Other contributors Heather Leslie, Ocean Informatics, Australia (Editor) Ian McNicoll, freshEHR Clinical Informatics, United Kingdom (Editor) Dunmail Hodkinson, Black Pear Software Ltd, UK References Use cases: - 5LICS, midclavicular line - L forearm, 2cm anterior to the cubital fossa - Right iliac fossa - 5 cm below L tibial tuberosity - 2 cm medial to R nipple - 4 cm below R costal margin in midclavicular line - R femur - midline nose - medial aspect of R great toe nail."/>
</mapping>
<mapping>
<identity value="w5"/>
<map value="clinical.diagnostics"/>
</mapping>
</element>
<element>
<path value="BodySite.patient"/>
<short value="Patient"/>
<definition value="The person to which the body site belongs."/>
<min value="1"/>
<max value="1"/>
<type>
<code value="Reference"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</type>
<isSummary value="true"/>
</element>
<element>
<path value="BodySite.identifier"/>
<short value="Bodysite identifier"/>
<definition value="Identifier for this instance of the anatomical location."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Identifier"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="openehr"/>
<map value="Specific location Cluster Optional (0..1) Cardinality: Mandatory, repeating, unordered (1..*)"/>
</mapping>
</element>
<element>
<path value="BodySite.code"/>
<short value="Named anatomical location"/>
<definition value="Named anatomical location - ideally coded where possible."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="CodeableConcept"/>
</type>
<isSummary value="true"/>
<binding>
<strength value="example"/>
<description value="Codes describing anatomical locations. May include laterality"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/body-site"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="OBX-20"/>
</mapping>
<mapping>
<identity value="openehr"/>
<map value="Name of location"/>
</mapping>
</element>
<element>
<path value="BodySite.modifier"/>
<short value="Modification to location code"/>
<definition value="Modifier to refine the anatomical location. These include modifiers for laterality, relative location, directionality, number, and plane."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="CodeableConcept"/>
</type>
<binding>
<strength value="example"/>
<description value="Concepts modifying the anatomic location"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/bodysite-relative-location"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="No distinct element defined in V2.x. The IHE Radiology Technical Framework directs the use of OBR-15-specimen source to contain laterality for imaging studies."/>
</mapping>
<mapping>
<identity value="openehr"/>
<map value="Combines Side, Numerical identifier, Anatomical plane,and Aspect"/>
</mapping>
</element>
<element>
<path value="BodySite.description"/>
<short value="The Description of anatomical location"/>
<definition value="Description of anatomical location."/>
<comments value="This Description could include any visual markings used to orientate the viewer e.g. external reference points, special sutures, ink markings."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="openehr"/>
<map value="Description of anatomical location/Visual markings/orientation"/>
</mapping>
</element>
<element>
<path value="BodySite.image"/>
<short value="Attached images"/>
<definition value="Image or images used to identify a location."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Attachment"/>
</type>
<mapping>
<identity value="openehr"/>
<map value="Image"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="boolean"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">to do</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/boolean"/>
<name value="boolean"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for boolean Type: Value of &quot;true&quot; or &quot;false&quot;"/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="boolean"/>
<short value="Primitive Type boolean"/>
<definition value="Value of &quot;true&quot; or &quot;false&quot;"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="boolean.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
</element>
<element>
<path value="boolean.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="boolean.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
</element>
<element>
<path value="boolean.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for boolean"/>
<definition value="The actual value"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<code>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
<valueString value="true | false"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
<valueString value="boolean"/>
</extension>
</code>
</type>
</element>
</snapshot>
<differential>
<element>
<path value="boolean"/>
<short value="Primitive Type boolean"/>
<definition value="Value of &quot;true&quot; or &quot;false&quot;"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="boolean.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for boolean"/>
<definition value="Primitive value for boolean"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<code>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
<valueString value="true | false"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
<valueString value="boolean"/>
</extension>
</code>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="code"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">to do</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/code"/>
<name value="code"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<constrainedType value="string"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/string"/>
<snapshot>
<element>
<path value="string"/>
<short value="Primitive Type code"/>
<definition value="A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="string"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="string.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="string.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
</element>
<element>
<path value="string.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for code"/>
<definition value="Primitive value for code"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="string.value"/>
<min value="0"/>
<max value="1"/>
</base>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="[^\s]+([\s][^\s]+)*"/>
</extension>
<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="xs:token"/>
</extension>
</code>
</type>
</element>
</snapshot>
<differential>
<element>
<path value="string"/>
<short value="Primitive Type code"/>
<definition value="A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="string.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for code"/>
<definition value="Primitive value for code"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="[^\s]+([\s][^\s]+)*"/>
</extension>
<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="xs:token"/>
</extension>
</code>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -1,311 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="CodeableConcept"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#CodeableConcept" title="CodeableConcept : A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.">CodeableConcept</a>
<a name="CodeableConcept"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Concept - reference to a terminology or just text</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#CodeableConcept.coding" title="CodeableConcept.coding : A reference to a code defined by a terminology system.">coding</a>
<a name="CodeableConcept.coding"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..*</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Coding">Coding</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Code defined by a terminology system</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#CodeableConcept.text" title="CodeableConcept.text : A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.">text</a>
<a name="CodeableConcept.text"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Plain text representation of the concept</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/CodeableConcept"/>
<name value="CodeableConcept"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for CodeableConcept Type"/>
<requirements value="This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="orim"/>
<uri value="http://hl7.org/orim"/>
<name value="Ontological RIM Mapping"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="CodeableConcept"/>
<short value="Concept - reference to a terminology or just text"/>
<definition value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."/>
<comments value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CE/CNE/CWE"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CD"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.coding"/>
<short value="Code defined by a terminology system"/>
<definition value="A reference to a code defined by a terminology system."/>
<comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true."/>
<requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Coding"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.1-8, C*E.10-22"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="union(., ./translation)"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.text"/>
<short value="Plain text representation of the concept"/>
<definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."/>
<comments value="Very often the text is the same as a displayName of one of the codings."/>
<requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.9. But note many systems use C*E.2 for this"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./originalText[mediaType/code=&quot;text/plain&quot;]/data"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="CodeableConcept"/>
<short value="Concept - reference to a terminology or just text"/>
<definition value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."/>
<comments value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CE/CNE/CWE"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CD"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept rdfs:subClassOf dt:CD"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.coding"/>
<short value="Code defined by a terminology system"/>
<definition value="A reference to a code defined by a terminology system."/>
<comments value="Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labelled as UserSelected = true."/>
<requirements value="Allows for translations and alternate encodings within a code system. Also supports communication of the same instance to systems requiring different encodings."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Coding"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.1-8, C*E.10-22"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="union(., ./translation)"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"/>
</mapping>
</element>
<element>
<path value="CodeableConcept.text"/>
<short value="Plain text representation of the concept"/>
<definition value="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user."/>
<comments value="Very often the text is the same as a displayName of one of the codings."/>
<requirements value="The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.9. But note many systems use C*E.2 for this"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./originalText[mediaType/code=&quot;text/plain&quot;]/data"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,509 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Coding"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding" title="Coding : A reference to a code defined by a terminology system.">Coding</a>
<a name="Coding"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">A reference to a code defined by a terminology system</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding.system" title="Coding.system : The identification of the code system that defines the meaning of the symbol in the code.">system</a>
<a name="Coding.system"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#uri">uri</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Identity of the terminology system</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding.version" title="Coding.version : The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.">version</a>
<a name="Coding.version"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Version of the system - if relevant</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding.code" title="Coding.code : A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).">code</a>
<a name="Coding.code"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Symbol in syntax defined by the system</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding.display" title="Coding.display : A representation of the meaning of the code in the system, following the rules of the system.">display</a>
<a name="Coding.display"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Representation defined by the system</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#Coding.userSelected" title="Coding.userSelected : Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).">userSelected</a>
<a name="Coding.userSelected"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#boolean">boolean</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">If this coding was chosen directly by the user</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Coding"/>
<name value="Coding"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for Coding Type"/>
<requirements value="References to codes are very common in healthcare models."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="orim"/>
<uri value="http://hl7.org/orim"/>
<name value="Ontological RIM Mapping"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="Coding"/>
<short value="A reference to a code defined by a terminology system"/>
<definition value="A reference to a code defined by a terminology system."/>
<comments value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CV"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding rdfs:subClassOf dt:CDCoding"/>
</mapping>
</element>
<element>
<path value="Coding.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Coding.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Coding.system"/>
<short value="Identity of the terminology system"/>
<definition value="The identification of the code system that defines the meaning of the symbol in the code."/>
<comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7&#39;s list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."/>
<requirements value="Need to be unambiguous about the source of the definition of the symbol."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystem"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
</mapping>
</element>
<element>
<path value="Coding.version"/>
<short value="Version of the system - if relevant"/>
<definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
<comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.7"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystemVersion"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
</mapping>
</element>
<element>
<path value="Coding.code"/>
<short value="Symbol in syntax defined by the system"/>
<definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
<requirements value="Need to refer to a particular code in the system."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
</mapping>
</element>
<element>
<path value="Coding.display"/>
<short value="Representation defined by the system"/>
<definition value="A representation of the meaning of the code in the system, following the rules of the system."/>
<requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.2 - but note this is not well followed"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CV.displayName"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
</mapping>
</element>
<element>
<path value="Coding.userSelected"/>
<short value="If this coding was chosen directly by the user"/>
<definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."/>
<comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly &#39;directly chosen&#39; implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
<requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="boolean"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="Sometimes implied by being first"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CD.codingRationale"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source &quot;true&quot;; fhir:target dt:CDCoding.codingRationale\#O ]"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Coding"/>
<short value="A reference to a code defined by a terminology system"/>
<definition value="A reference to a code defined by a terminology system."/>
<comments value="Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CV"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding rdfs:subClassOf dt:CDCoding"/>
</mapping>
</element>
<element>
<path value="Coding.system"/>
<short value="Identity of the terminology system"/>
<definition value="The identification of the code system that defines the meaning of the symbol in the code."/>
<comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7&#39;s list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously."/>
<requirements value="Need to be unambiguous about the source of the definition of the symbol."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="uri"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystem"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"/>
</mapping>
</element>
<element>
<path value="Coding.version"/>
<short value="Version of the system - if relevant"/>
<definition value="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."/>
<comments value="Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.7"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./codeSystemVersion"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"/>
</mapping>
</element>
<element>
<path value="Coding.code"/>
<short value="Symbol in syntax defined by the system"/>
<definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)."/>
<requirements value="Need to refer to a particular code in the system."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./code"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"/>
</mapping>
</element>
<element>
<path value="Coding.display"/>
<short value="Representation defined by the system"/>
<definition value="A representation of the meaning of the code in the system, following the rules of the system."/>
<requirements value="Need to be able to carry a human-readable meaning of the code for readers that do not know the system."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="C*E.2 - but note this is not well followed"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CV.displayName"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"/>
</mapping>
</element>
<element>
<path value="Coding.userSelected"/>
<short value="If this coding was chosen directly by the user"/>
<definition value="Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays)."/>
<comments value="Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly &#39;directly chosen&#39; implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely."/>
<requirements value="This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="boolean"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="Sometimes implied by being first"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CD.codingRationale"/>
</mapping>
<mapping>
<identity value="orim"/>
<map value="fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source &quot;true&quot;; fhir:target dt:CDCoding.codingRationale\#O ]"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,559 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="ContactPoint"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table border="0" cellpadding="0" cellspacing="0" style="border: 0px; 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; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="The logical name of the element">Name</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Information about the use of the element">Flags</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.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="formats.html#table" title="Reference to the type of the element">Type</a>
</th>
<th style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="formats.html#table" title="Additional information about the element">Description &amp; Constraints</a>
<span style="float: right">
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/>
</a>
</span>
</th>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAMQfAOvGUf7ztuvPMf/78/fkl/Pbg+u8Rvjqteu2Pf3zxPz36Pz0z+vTmPzurPvuw/npofbjquvNefHVduuyN+uuMu3Oafbgjfnqvf/3zv/3xevPi+vRjP/20/bmsP///////yH5BAEAAB8ALAAAAAAQABAAAAV24CeOZGmepqeqqOgxjBZFa+19r4ftWQUAgqDgltthMshMIJAZ4jYDHsBARSAmFOJvq+g6HIdEFgcYmBWNxoNAsDjGHgBnmV5bCoUDHLBIq9sFEhIdcAYJdYASFRUQhQkLCwkOFwcdEBAXhVabE52ecDahKy0oIQA7" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint" title="ContactPoint : Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.">ContactPoint</a>
<a name="ContactPoint"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ </span>
<span title="This element has or is affected by some invariants">I</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy"></td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="element.html">Element</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Details of a Technology mediated contact point (phone, fax, email, etc.)
<br/>
<span style="font-style: italic" title="cpt-2">A system is required if a value is provided.</span>
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint.system" title="ContactPoint.system : Telecommunications form for contact point - what communications system is required to make use of the contact.">system</a>
<a name="ContactPoint.system"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ </span>
<span title="This element has or is affected by some invariants">I</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">phone | fax | email | pager | other
<br/>
<a href="valueset-contact-point-system.html" title="Telecommunications form for contact point">ContactPointSystem</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint.value" title="ContactPoint.value : The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).">value</a>
<a name="ContactPoint.value"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#string">string</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">The actual contact point details</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint.use" title="ContactPoint.use : Identifies the purpose for the contact point.">use</a>
<a name="ContactPoint.use"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is a modifier element">?! </span>
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#code">code</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">home | work | temp | old | mobile - purpose of this contact point
<br/>
<a href="valueset-contact-point-use.html" title="Use of contact point">ContactPointUse</a> (
<a href="terminologies.html#required" title="To be conformant, instances of this element SHALL include a code from the specified value set.">Required</a>)
</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAL0lEQVR42u3XsQ0AQAgCQHdl/xn8jxvYWB3JlTR0VJLa+OltBwAAYP6EEQAAgCsPVYVAgIJrA/sAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzI3XJ6V3QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+2RsQ0AIAzDav7/2VzQwoCY4iWbZSmo1QGoUgNMghvWaIejPQW/CrrNCylIwcOCDYfLNRcNer4SAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gYBFzI0BrFQCwAAAERJREFUOMtj/P//PwMlgImBQjDwBrCcOnWKokBgYWBgYDCU+06W5i8MUggvnH/EOVJjAW4AuQHJ+O75LYqikXE0LzAAALePEntTkEoSAAAAAElFTkSuQmCC" alt="." style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint.rank" title="ContactPoint.rank : Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.">rank</a>
<a name="ContactPoint.rank"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#positiveInt">positiveInt</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Specify preferred order of use (1 = highest)</td>
</tr>
<tr style="border: 0px; padding:0px; vertical-align: top; background-color: white;">
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAACCAYAAACg/LjIAAAAI0lEQVR42u3QIQEAAAACIL/6/4MvTAQOkLYBAAB4kAAAANwMad9AqkRjgNAAAAAASUVORK5CYII=)" class="hierarchy">
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAWCAYAAAABxvaqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzIs1vtcMQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAE0lEQVQI12P4//8/AxMDAwNdCABMPwMo2ctnoQAAAABJRU5ErkJggg==" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAWCAYAAADJqhx8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wYeFzME+lXFigAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANklEQVQ4y+3OsRUAIAjEUOL+O8cJABttJM11/x1qZAGqRBEVcNIqdWj1efDqQbb3HwwwwEfABmQUHSPM9dtDAAAAAElFTkSuQmCC" alt="." style="background-color: inherit" class="hierarchy"/>
<img src="data: image/png;base64,R0lGODlhEAAQAOZ/APrkusOiYvvfqbiXWaV2G+jGhdq1b8GgYf3v1frw3vTUlsWkZNewbcSjY/DQkad4Hb6dXv3u0f3v1ObEgfPTlerJiP3w1v79+e7OkPrfrfnjuNOtZPrpydaxa+/YrvvdpP779ZxvFPvnwKKBQaFyF/369M2vdaqHRPz58/HNh/vowufFhfroxO3OkPrluv779tK0e6JzGProwvrow9m4eOnIifPTlPDPkP78+Naxaf3v0/zowfXRi+bFhLWUVv379/rnwPvszv3rye3LiPvnv+3MjPDasKiIS/789/3x2f747eXDg+7Mifvu0tu7f+/QkfDTnPXWmPrjsvrjtPbPgrqZW+/QlPz48K2EMv36866OUPvowat8Ivvgq/Pbrvzgq/PguvrgrqN0Gda2evfYm9+7d/rpw9q6e/LSku/Rl/XVl/LSlfrkt+zVqe7Wqv3x1/bNffbOf59wFdS6if3u0vrqyP3owPvepfXQivDQkO/PkKh9K7STVf779P///////yH5BAEAAH8ALAAAAAAQABAAAAfNgH+Cg36FfoOIhH4JBxBghYl/hQkNAV0IVT5GkJKLCwtQaSsSdx9aR26Gcwt2IkQaNRI6dBERIzCFDSgWSW8WCDkbBnoOQ3uFARc/JQJfCAZlT0x4ZFyFBxdNQT9ZCBNWKQoKUQ+FEDgcdTIAV14YDmg2CgSFA0hmQC5TLE4VRTdrKJAoxOeFCzZSwsw4U6BCizwUQhQyEaAPiAwCVNCY0FCNnA6GPAwYoETIFgY9loiRA4dToTYnsOxg8CBGHE6ICvEYQ4AKzkidfgoKBAA7" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/>
<a href="datatypes-definitions.html#ContactPoint.period" title="ContactPoint.period : Time period when the contact point was/is in use.">period</a>
<a name="ContactPoint.period"> </a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<span title="This element is included in summaries">Σ</span>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">0..1</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">
<a href="datatypes.html#Period">Period</a>
</td>
<td style="vertical-align: top; text-align : left; background-color: white; padding:0px 4px 0px 4px" class="hierarchy">Time period when the contact point was/is in use</td>
</tr>
<tr>
<td colspan="5" class="hierarchy">
<br/>
<a href="formats.html#table" title="Legend for this format">
<img src="help16.png" alt="doco" style="background-color: inherit"/> Documentation for this format
</a>
</td>
</tr>
</table>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/ContactPoint"/>
<name value="ContactPoint"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for ContactPoint Type"/>
<requirements value="Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc."/>
<fhirVersion value="1.3.0"/>
<mapping>
<identity value="v2"/>
<uri value="http://hl7.org/v2"/>
<name value="HL7 v2"/>
</mapping>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM"/>
</mapping>
<mapping>
<identity value="servd"/>
<uri value="http://www.omg.org/spec/ServD/1.0/"/>
<name value="ServD"/>
</mapping>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="ContactPoint"/>
<short value="Details of a Technology mediated contact point (phone, fax, email, etc.)"/>
<definition value="Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="value.empty() or system"/>
</extension>
<key value="cpt-2"/>
<severity value="error"/>
<human value="A system is required if a value is provided."/>
<xpath value="not(exists(f:value)) or exists(f:system)"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XTN"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="TEL"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="ContactPoint"/>
</mapping>
</element>
<element>
<path value="ContactPoint.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="ContactPoint.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="*"/>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="ContactPoint.system"/>
<short value="phone | fax | email | pager | other"/>
<definition value="Telecommunications form for contact point - what communications system is required to make use of the contact."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<condition value="cpt-2"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Telecommunications form for contact point"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/contact-point-system"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XTN.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./scheme"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./ContactPointType"/>
</mapping>
</element>
<element>
<path value="ContactPoint.value"/>
<short value="The actual contact point details"/>
<definition value="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."/>
<comments value="Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value."/>
<requirements value="Need to support legacy numbers that are not in a tightly controlled format."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XTN.1 (or XTN.12)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./url"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Value"/>
</mapping>
</element>
<element>
<path value="ContactPoint.use"/>
<short value="home | work | temp | old | mobile - purpose of this contact point"/>
<definition value="Identifies the purpose for the contact point."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old."/>
<requirements value="Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Use of contact point"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/contact-point-use"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XTN.2 - but often indicated by field"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./ContactPointPurpose"/>
</mapping>
</element>
<element>
<path value="ContactPoint.rank"/>
<short value="Specify preferred order of use (1 = highest)"/>
<definition value="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values."/>
<comments value="Note that rank does not necessarily follow the order in which the contacts are represented in the instance."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="positiveInt"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="n/a"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="ContactPoint.period"/>
<short value="Time period when the contact point was/is in use"/>
<definition value="Time period when the contact point was/is in use."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./useablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="ContactPoint"/>
<short value="Details of a Technology mediated contact point (phone, fax, email, etc.)"/>
<definition value="Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="value.empty() or system"/>
</extension>
<key value="cpt-2"/>
<severity value="error"/>
<human value="A system is required if a value is provided."/>
<xpath value="not(exists(f:value)) or exists(f:system)"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XTN"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="TEL"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="ContactPoint"/>
</mapping>
</element>
<element>
<path value="ContactPoint.system"/>
<short value="phone | fax | email | pager | other"/>
<definition value="Telecommunications form for contact point - what communications system is required to make use of the contact."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<condition value="cpt-2"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Telecommunications form for contact point"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/contact-point-system"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XTN.3"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./scheme"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./ContactPointType"/>
</mapping>
</element>
<element>
<path value="ContactPoint.value"/>
<short value="The actual contact point details"/>
<definition value="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)."/>
<comments value="Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value."/>
<requirements value="Need to support legacy numbers that are not in a tightly controlled format."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="XTN.1 (or XTN.12)"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./url"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./Value"/>
</mapping>
</element>
<element>
<path value="ContactPoint.use"/>
<short value="home | work | temp | old | mobile - purpose of this contact point"/>
<definition value="Identifies the purpose for the contact point."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old."/>
<requirements value="Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="code"/>
</type>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="Use of contact point"/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/contact-point-use"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="XTN.2 - but often indicated by field"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="unique(./use)"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./ContactPointPurpose"/>
</mapping>
</element>
<element>
<path value="ContactPoint.rank"/>
<short value="Specify preferred order of use (1 = highest)"/>
<definition value="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values."/>
<comments value="Note that rank does not necessarily follow the order in which the contacts are represented in the instance."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="positiveInt"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="n/a"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="ContactPoint.period"/>
<short value="Time period when the contact point was/is in use"/>
<definition value="Time period when the contact point was/is in use."/>
<min value="0"/>
<max value="1"/>
<type>
<code value="Period"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="./useablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]"/>
</mapping>
<mapping>
<identity value="servd"/>
<map value="./StartDate and ./EndDate"/>
</mapping>
</element>
</differential>
</StructureDefinition>

View File

@ -1,284 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="Count"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<h2>Data type Count</h2>
<p>A count of a discrete element (no unit)</p>
<h3>Rule</h3>
<p>There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number.</p>
<p>XPath:</p>
<blockquote>
<pre>(f:code or not(f:value)) and (not(exists(f:system)) or (f:system/@value=&#39;http://unitsofmeasure.org&#39; and f:code/@value=&#39;1&#39;)) and not(contains(f:value/@value, &#39;.&#39;))</pre>
</blockquote>
</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/Count"/>
<name value="Count"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="A count of a discrete element (no unit)"/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<constrainedType value="Quantity"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Quantity"/>
<snapshot>
<element>
<path value="Quantity"/>
<name value="Count"/>
<short value="A count of a discrete element (no unit)"/>
<definition value="There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number."/>
<comments value="The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Quantity"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Quantity"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="code.empty() or system"/>
</extension>
<key value="qty-3"/>
<severity value="error"/>
<human value="If a code for the unit is present, the system SHALL also be present"/>
<xpath value="not(exists(f:code)) or exists(f:system)"/>
</constraint>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="(code or value.empty()) and (system.empty() or system = %ucum) and (code.empty() or code = &#39;1&#39;) and (value.empty() or value.contains(&#39;.&#39;).not())"/>
</extension>
<key value="cnt-1"/>
<severity value="error"/>
<human value="There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number."/>
<xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or (f:system/@value=&#39;http://unitsofmeasure.org&#39; and f:code/@value=&#39;1&#39;)) and not(contains(f:value/@value, &#39;.&#39;))"/>
</constraint>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="SN (see also Range) or CQ"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ, IVL&lt;PQ&gt;, MO, CO, depending on the values"/>
</mapping>
</element>
<element>
<path value="Quantity.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="id"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Quantity.extension"/>
<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. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="Quantity.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element>
<path value="Quantity.value"/>
<short value="Numerical value (with implicit precision)"/>
<definition value="The value of the measured amount. The value includes an implicit precision in the presentation of the value."/>
<comments value="The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books)."/>
<requirements value="Precision is handled implicitly in almost all cases of measurement."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.value"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="decimal"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="SN.2 / CQ - N/A"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"/>
</mapping>
</element>
<element>
<path value="Quantity.comparator"/>
<short value="&lt; | &lt;= | &gt;= | &gt; - how to understand the value"/>
<definition value="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is &quot;&lt;&quot; , then the real value is &lt; stated value."/>
<comments value="This is labeled as &quot;Is Modifier&quot; because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value."/>
<requirements value="Need a framework for handling measures where the value is &lt;5ug/L or &gt;400mg/L due to the limitations of measuring methodology."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.comparator"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<meaningWhenMissing value="If there is no comparator, then there is no modification of the value"/>
<isModifier value="true"/>
<isSummary value="true"/>
<binding>
<strength value="required"/>
<description value="How the Quantity should be understood and represented."/>
<valueSetReference>
<reference value="http://hl7.org/fhir/ValueSet/quantity-comparator"/>
</valueSetReference>
</binding>
<mapping>
<identity value="v2"/>
<map value="SN.1 / CQ.1"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="IVL properties"/>
</mapping>
</element>
<element>
<path value="Quantity.unit"/>
<short value="Unit representation"/>
<definition value="A human-readable form of the unit."/>
<requirements value="There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.unit"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.unit"/>
</mapping>
</element>
<element>
<path value="Quantity.system"/>
<short value="System that defines coded unit form"/>
<definition value="The identification of the system that provides the coded form of the unit."/>
<requirements value="Need to know the system that defines the coded form of the unit."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.system"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
<condition value="qty-3"/>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="CO.codeSystem, PQ.translation.codeSystem"/>
</mapping>
</element>
<element>
<path value="Quantity.code"/>
<short value="Coded form of the unit"/>
<definition value="A computer processable form of the unit in some unit representation system."/>
<comments value="The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system."/>
<requirements value="Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Quantity.code"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<isSummary value="true"/>
<mapping>
<identity value="v2"/>
<map value="(see OBX.6 etc.) / CQ.2"/>
</mapping>
<mapping>
<identity value="rim"/>
<map value="PQ.code, MO.currency, PQ.translation.code"/>
</mapping>
</element>
</snapshot>
<differential>
<element>
<path value="Quantity"/>
<name value="Count"/>
<short value="A count of a discrete element (no unit)"/>
<definition value="There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Quantity"/>
</type>
<constraint>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression">
<valueString value="(code or value.empty()) and (system.empty() or system = %ucum) and (code.empty() or code = &#39;1&#39;) and (value.empty() or value.contains(&#39;.&#39;).not())"/>
</extension>
<key value="cnt-1"/>
<severity value="error"/>
<human value="There SHALL be a code with a value of &quot;1&quot; if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. If present, the value SHALL a whole number."/>
<xpath value="(f:code or not(f:value)) and (not(exists(f:system)) or (f:system/@value=&#39;http://unitsofmeasure.org&#39; and f:code/@value=&#39;1&#39;)) and not(contains(f:value/@value, &#39;.&#39;))"/>
</constraint>
<isModifier value="false"/>
</element>
</differential>
</StructureDefinition>

View File

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="date"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">to do</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/date"/>
<name value="date"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for date Type: A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="date"/>
<short value="Primitive Type date"/>
<definition value="A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="date.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
</element>
<element>
<path value="date.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="date.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
</element>
<element>
<path value="date.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for date"/>
<definition value="The actual value"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?"/>
</extension>
<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="xs:gYear, xs:gYearMonth, xs:date"/>
</extension>
</code>
</type>
</element>
</snapshot>
<differential>
<element>
<path value="date"/>
<short value="Primitive Type date"/>
<definition value="A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="date.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for date"/>
<definition value="Primitive value for date"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?"/>
</extension>
<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="xs:gYear, xs:gYearMonth, xs:date"/>
</extension>
</code>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="dateTime"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">to do</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/dateTime"/>
<name value="dateTime"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for dateTime Type: A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="dateTime"/>
<short value="Primitive Type dateTime"/>
<definition value="A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="dateTime.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
</element>
<element>
<path value="dateTime.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="dateTime.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
</element>
<element>
<path value="dateTime.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for dateTime"/>
<definition value="The actual value"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"/>
</extension>
<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="xs:gYear, xs:gYearMonth, xs:date, xs:dateTime"/>
</extension>
</code>
</type>
</element>
</snapshot>
<differential>
<element>
<path value="dateTime"/>
<short value="Primitive Type dateTime"/>
<definition value="A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="dateTime.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for dateTime"/>
<definition value="Primitive value for dateTime"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"/>
</extension>
<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="xs:gYear, xs:gYearMonth, xs:date, xs:dateTime"/>
</extension>
</code>
</type>
</element>
</differential>
</StructureDefinition>

View File

@ -1,128 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="decimal"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">to do</div>
</text>
<url value="http://hl7.org/fhir/StructureDefinition/decimal"/>
<name value="decimal"/>
<status value="draft"/>
<publisher value="HL7 FHIR Standard"/>
<contact>
<telecom>
<system value="other"/>
<value value="http://hl7.org/fhir"/>
</telecom>
</contact>
<date value="2016-01-20T08:16:20-05:00"/>
<description value="Base StructureDefinition for decimal Type: A rational number with implicit precision"/>
<fhirVersion value="1.3.0"/>
<kind value="datatype"/>
<abstract value="false"/>
<base value="http://hl7.org/fhir/StructureDefinition/Element"/>
<snapshot>
<element>
<path value="decimal"/>
<short value="Primitive Type decimal"/>
<definition value="A rational number with implicit precision"/>
<comments value="Do not use a IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="decimal.id"/>
<representation value="xmlAttr"/>
<short value="xml:id (or equivalent in JSON)"/>
<definition value="unique id for the element within a resource (for internal references)"/>
<min value="0"/>
<max value="1"/>
<type>
<code value="id"/>
</type>
</element>
<element>
<path value="decimal.extension"/>
<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 resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
<comments 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="decimal.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
</element>
<element>
<path value="decimal.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for decimal"/>
<definition value="The actual value"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?([0]|([1-9][0-9]*))(\.[0-9]+)?"/>
</extension>
<code>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
<valueString value="number"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
<valueString value="decimal"/>
</extension>
</code>
</type>
</element>
</snapshot>
<differential>
<element>
<path value="decimal"/>
<short value="Primitive Type decimal"/>
<definition value="A rational number with implicit precision"/>
<comments value="Do not use a IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)"/>
<min value="0"/>
<max value="*"/>
<type>
<code value="Element"/>
</type>
</element>
<element>
<path value="decimal.value"/>
<representation value="xmlAttr"/>
<short value="Primitive value for decimal"/>
<definition value="Primitive value for decimal"/>
<min value="0"/>
<max value="1"/>
<!-- Note: primitive values do not have an assigned type
e.g. this is compiler magic
XML and JSON types provided by extension -->
<type>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-regex">
<valueString value="-?([0]|([1-9][0-9]*))(\.[0-9]+)?"/>
</extension>
<code>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-json-type">
<valueString value="number"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-type">
<valueString value="decimal"/>
</extension>
</code>
</type>
</element>
</differential>
</StructureDefinition>

Some files were not shown because too many files have changed in this diff Show More