Use R5 snapshot generator (#1862)

* Use R5 snapshot generator

* Snapshot generator reworking
This commit is contained in:
James Agnew 2020-05-23 12:54:19 -04:00 committed by GitHub
parent c374383b37
commit e780a8402e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 8477 additions and 420 deletions

View File

@ -76,13 +76,13 @@ public interface IValidationSupport {
/**
* Expands the given portion of a ValueSet
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theExpansionOptions If provided (may be <code>null</code>), contains options controlling the expansion
* @param theValueSetToExpand The valueset that should be expanded
* @return The expansion, or null
*/
default ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, @Nullable ValueSetExpansionOptions theExpansionOptions, @Nonnull IBaseResource theValueSetToExpand) {
default ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, @Nullable ValueSetExpansionOptions theExpansionOptions, @Nonnull IBaseResource theValueSetToExpand) {
return null;
}
@ -149,13 +149,13 @@ public interface IValidationSupport {
* Returns <code>true</code> if codes in the given code system can be expanded
* or validated
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theSystem The URI for the code system, e.g. <code>"http://loinc.org"</code>
* @return Returns <code>true</code> if codes in the given code system can be
* validated
*/
default boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
default boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return false;
}
@ -171,7 +171,7 @@ public interface IValidationSupport {
* name. This method is called to check codes which are found in "example"
* binding fields (e.g. <code>Observation.code</code> in the default profile.
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theOptions Provides options controlling the validation
* @param theCodeSystem The code system, e.g. "<code>http://loinc.org</code>"
@ -179,7 +179,7 @@ public interface IValidationSupport {
* @param theDisplay The display name, if it should also be validated
* @return Returns a validation result object
*/
default CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
default CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
return null;
}
@ -188,7 +188,7 @@ public interface IValidationSupport {
* name. This method is called to check codes which are found in "example"
* binding fields (e.g. <code>Observation.code</code> in the default profile.
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theCodeSystem The code system, e.g. "<code>http://loinc.org</code>"
* @param theCode The code, e.g. "<code>1234-5</code>"
@ -196,19 +196,19 @@ public interface IValidationSupport {
* @param theValueSet The ValueSet to validate against. Must not be null, and must be a ValueSet resource.
* @return Returns a validation result object, or <code>null</code> if this validation support module can not handle this kind of request
*/
default CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
default CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
return null;
}
/**
* Look up a code using the system and code value
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theSystem The CodeSystem URL
* @param theCode The code
*/
default LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
default LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return null;
}
@ -216,22 +216,22 @@ public interface IValidationSupport {
* Returns <code>true</code> if the given valueset can be validated by the given
* validation support module
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @param theValueSetUrl The ValueSet canonical URL
*/
default boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
default boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
return false;
}
/**
* Generate a snapshot from the given differential profile.
*
* @param theRootValidationSupport The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* @param theValidationSupportContext The validation support module will be passed in to this method. This is convenient in cases where the operation needs to make calls to
* other method in the support chain, so that they can be passed through the entire chain. Implementations of this interface may always safely ignore this parameter.
* @return Returns null if this module does not know how to handle this request
*/
default IBaseResource generateSnapshot(IValidationSupport theRootValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
default IBaseResource generateSnapshot(ValidationSupportContext theValidationSupportContext, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
return null;
}

View File

@ -0,0 +1,22 @@
package ca.uhn.fhir.context.support;
import java.util.HashSet;
import java.util.Set;
public class ValidationSupportContext {
private final IValidationSupport myRootValidationSupport;
private final Set<String> myCurrentlyGeneratingSnapshots = new HashSet<>();
public ValidationSupportContext(IValidationSupport theRootValidationSupport) {
myRootValidationSupport = theRootValidationSupport;
}
public IValidationSupport getRootValidationSupport() {
return myRootValidationSupport;
}
public Set<String> getCurrentlyGeneratingSnapshots() {
return myCurrentlyGeneratingSnapshots;
}
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.cli;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
@ -53,7 +54,7 @@ public class LoadingValidationSupportDstu2 implements IValidationSupport {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return false;
}

View File

@ -24,6 +24,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.parser.StrictErrorHandler;
import ca.uhn.fhir.rest.client.api.IGenericClient;
@ -284,19 +285,19 @@ public class ValidatorExamples {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
// TODO: implement (or return null if your implementation does not support this function)
return false;
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
// TODO: implement (or return null if your implementation does not support this function)
return null;
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
// TODO: implement (or return null if your implementation does not support this function)
return null;
}

View File

@ -0,0 +1,6 @@
---
type: add
issue: 1862
title: "The Snapshot Generator now uses the R5 codebase for all versions of FHIR (similar to how the validator already
worked). This means that the snapshot generator will be much more feature complete and hopefully have fewer bugs
given the single codebase."

View File

@ -1,4 +1,16 @@
---
- item:
type: "add"
title: "The version of a few dependencies have been bumped to the latest versions
(dependent HAPI modules listed in brackets):
<ul>
</ul>"
- item:
issue: "1862"
type: "fix"
title: "**Breaking Change**: The IValidationSupport interface has had one further change after the rewrite in HAPI FHIR 5.0.0.
Instead of passing an IValidationSupport object as an argument to many methods on the interface, a context object is
now used instead."
- item:
issue: "1857"
type: "change"

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.igpacks.parser;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import org.hl7.fhir.dstu2.model.ConceptMap;
import org.hl7.fhir.dstu2.model.StructureDefinition;
import org.hl7.fhir.dstu2.model.ValueSet;
@ -75,7 +76,7 @@ public class IgPackValidationSupportDstu2 implements IValidationSupport {
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return false;
}

View File

@ -23,6 +23,7 @@ package ca.uhn.fhir.igpacks.parser;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import org.hl7.fhir.dstu3.model.CodeSystem;
import org.hl7.fhir.dstu3.model.ConceptMap;
import org.hl7.fhir.dstu3.model.StructureDefinition;
@ -101,17 +102,17 @@ public class IgPackValidationSupportDstu3 implements IValidationSupport {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return false;
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
return null;
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return null;
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.dao.dstu3;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao;
@ -108,9 +109,9 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao<Code
ourLog.debug("Looking up {} / {}", system, code);
if (myValidationSupport.isCodeSystemSupported(myValidationSupport, system)) {
if (myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), system)) {
ourLog.debug("Code system {} is supported", system);
IValidationSupport.LookupCodeResult result = myValidationSupport.lookupCode(myValidationSupport, system, code);
IValidationSupport.LookupCodeResult result = myValidationSupport.lookupCode(new ValidationSupportContext(myValidationSupport), system, code);
if (result != null) {
return result;
}

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.jpa.dao.dstu3;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoStructureDefinition;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import org.apache.commons.lang3.Validate;
@ -34,7 +35,7 @@ public class FhirResourceDaoStructureDefinitionDstu3 extends BaseHapiFhirResourc
@Override
public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) {
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(myValidationSupport, theInput, theUrl, theName, null);
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(new ValidationSupportContext(myValidationSupport), theInput, theUrl, theName, null);
Validate.notNull(output);
return output;
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.dao.dstu3;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
@ -99,7 +100,7 @@ public class FhirResourceDaoValueSetDstu3 extends BaseHapiFhirResourceDao<ValueS
validateIncludes("include", theSource.getCompose().getInclude());
validateIncludes("exclude", theSource.getCompose().getExclude());
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, null, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
@ -112,7 +113,7 @@ public class FhirResourceDaoValueSetDstu3 extends BaseHapiFhirResourceDao<ValueS
ValueSetExpansionOptions options = new ValueSetExpansionOptions()
.setOffset(theOffset)
.setCount(theCount);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, options, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), options, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.dao.r4;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao;
@ -103,10 +104,10 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao<CodeSys
ourLog.info("Looking up {} / {}", system, code);
if (myValidationSupport.isCodeSystemSupported(myValidationSupport, system)) {
if (myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), system)) {
ourLog.info("Code system {} is supported", system);
IValidationSupport.LookupCodeResult retVal = myValidationSupport.lookupCode(myValidationSupport, system, code);
IValidationSupport.LookupCodeResult retVal = myValidationSupport.lookupCode(new ValidationSupportContext(myValidationSupport), system, code);
if (retVal != null) {
return retVal;
}

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.jpa.dao.r4;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoStructureDefinition;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import org.apache.commons.lang3.Validate;
@ -34,7 +35,7 @@ public class FhirResourceDaoStructureDefinitionR4 extends BaseHapiFhirResourceDa
@Override
public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) {
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(myValidationSupport, theInput, theUrl, theWebUrl, theName);
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(new ValidationSupportContext(myValidationSupport), theInput, theUrl, theWebUrl, theName);
Validate.notNull(output);
return output;
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.dao.r4;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
@ -89,7 +90,7 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao<ValueSet>
}
private ValueSet doExpand(ValueSet theSource) {
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, null, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
@ -99,7 +100,7 @@ public class FhirResourceDaoValueSetR4 extends BaseHapiFhirResourceDao<ValueSet>
ValueSetExpansionOptions options = new ValueSetExpansionOptions()
.setOffset(theOffset)
.setCount(theCount);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, options, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), options, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
}

View File

@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.dao.r5;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao;
@ -105,10 +106,10 @@ public class FhirResourceDaoCodeSystemR5 extends BaseHapiFhirResourceDao<CodeSys
ourLog.info("Looking up {} / {}", system, code);
if (myValidationSupport.isCodeSystemSupported(myValidationSupport, system)) {
if (myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), system)) {
ourLog.info("Code system {} is supported", system);
IValidationSupport.LookupCodeResult retVal = myValidationSupport.lookupCode(myValidationSupport, system, code);
IValidationSupport.LookupCodeResult retVal = myValidationSupport.lookupCode(new ValidationSupportContext(myValidationSupport), system, code);
if (retVal != null) {
return retVal;
}

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.jpa.dao.r5;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoStructureDefinition;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirResourceDao;
import org.apache.commons.lang3.Validate;
@ -34,7 +35,7 @@ public class FhirResourceDaoStructureDefinitionR5 extends BaseHapiFhirResourceDa
@Override
public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theName) {
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(myValidationSupport, theInput, theUrl, theWebUrl, theName);
StructureDefinition output = (StructureDefinition) myValidationSupport.generateSnapshot(new ValidationSupportContext(myValidationSupport), theInput, theUrl, theWebUrl, theName);
Validate.notNull(output);
return output;
}

View File

@ -21,6 +21,7 @@ package ca.uhn.fhir.jpa.dao.r5;
*/
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoCodeSystem;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
@ -91,7 +92,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao<ValueSet>
}
private ValueSet doExpand(ValueSet theSource) {
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, null, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
@ -101,7 +102,7 @@ public class FhirResourceDaoValueSetR5 extends BaseHapiFhirResourceDao<ValueSet>
ValueSetExpansionOptions options = new ValueSetExpansionOptions()
.setOffset(theOffset)
.setCount(theCount);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(myValidationSupport, options, theSource);
IValidationSupport.ValueSetExpansionOutcome retVal = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), options, theSource);
validateHaveExpansionOrThrowInternalErrorException(retVal);
return (ValueSet) retVal.getValueSet();
}

View File

@ -23,6 +23,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
@ -208,7 +209,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc {
private DaoConfig myDaoConfig;
private Cache<TranslationQuery, List<TermConceptMapGroupElementTarget>> myTranslationCache;
private Cache<TranslationQuery, List<TermConceptMapGroupElement>> myTranslationWithReverseCache;
private int myFetchSize = DEFAULT_FETCH_SIZE;
private final int myFetchSize = DEFAULT_FETCH_SIZE;
private TransactionTemplate myTxTemplate;
@Autowired
private PlatformTransactionManager myTransactionManager;
@ -230,7 +231,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc {
private volatile IValidationSupport myValidationSupport;
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return supportsSystem(theSystem);
}
@ -1920,18 +1921,18 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc {
}
@Override
public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
IPrimitiveType<?> urlPrimitive = myContext.newTerser().getSingleValueOrNull(theValueSet, "url", IPrimitiveType.class);
String url = urlPrimitive.getValueAsString();
if (isNotBlank(url)) {
return validateCode(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, url);
return validateCode(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, url);
}
return null;
}
Optional<VersionIndependentConcept> validateCodeInValueSet(IValidationSupport theValidationSupport, ConceptValidationOptions theValidationOptions, String theValueSetUrl, String theCodeSystem, String theCode) {
IBaseResource valueSet = theValidationSupport.fetchValueSet(theValueSetUrl);
Optional<VersionIndependentConcept> validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theValidationOptions, String theValueSetUrl, String theCodeSystem, String theCode) {
IBaseResource valueSet = theValidationSupportContext.getRootValidationSupport().fetchValueSet(theValueSetUrl);
// If we don't have a PID, this came from some source other than the JPA
// database, so we don't need to check if it's pre-expanded or not
@ -2026,7 +2027,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc {
@Override
public List<VersionIndependentConcept> findCodesAboveUsingBuiltInSystems(String theSystem, String theCode) {
ArrayList<VersionIndependentConcept> retVal = new ArrayList<>();
CodeSystem system = (CodeSystem) fetchCanonicalCodeSystemFromCompleteContext(theSystem);
CodeSystem system = fetchCanonicalCodeSystemFromCompleteContext(theSystem);
if (system != null) {
findCodesAbove(system, theSystem, theCode, retVal);
}
@ -2051,7 +2052,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc {
@Override
public List<VersionIndependentConcept> findCodesBelowUsingBuiltInSystems(String theSystem, String theCode) {
ArrayList<VersionIndependentConcept> retVal = new ArrayList<>();
CodeSystem system = (CodeSystem) fetchCanonicalCodeSystemFromCompleteContext(theSystem);
CodeSystem system = fetchCanonicalCodeSystemFromCompleteContext(theSystem);
if (system != null) {
findCodesBelow(system, theSystem, theCode, retVal);
}

View File

@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
@ -65,7 +66,7 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation
@Override
public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
public ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
try {
org.hl7.fhir.r4.model.ValueSet valueSetToExpandR4;
valueSetToExpandR4 = toCanonicalValueSet(theValueSetToExpand);
@ -131,12 +132,12 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation
@CoverageIgnore
@Override
public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public IValidationSupport.CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
Optional<VersionIndependentConcept> codeOpt = Optional.empty();
boolean haveValidated = false;
if (isNotBlank(theValueSetUrl)) {
codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode);
codeOpt = super.validateCodeInValueSet(theValidationSupportContext, theOptions, theValueSetUrl, theCodeSystem, theCode);
haveValidated = true;
}
@ -159,7 +160,7 @@ public class TermReadSvcDstu3 extends BaseTermReadSvcImpl implements IValidation
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return super.lookupCode(theSystem, theCode);
}

View File

@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
@ -66,7 +67,7 @@ public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4
@Transactional(dontRollbackOn = {ExpansionTooCostlyException.class})
@Override
public IValidationSupport.ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
public IValidationSupport.ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
ValueSet expanded = super.expandValueSet(theExpansionOptions, (ValueSet) theValueSetToExpand);
return new IValidationSupport.ValueSetExpansionOutcome(expanded);
}
@ -77,7 +78,7 @@ public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4
}
@Override
public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
return fetchValueSet(theValueSetUrl) != null;
}
@ -99,12 +100,12 @@ public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4
@CoverageIgnore
@Override
public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public IValidationSupport.CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
Optional<VersionIndependentConcept> codeOpt = Optional.empty();
boolean haveValidated = false;
if (isNotBlank(theValueSetUrl)) {
codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode);
codeOpt = super.validateCodeInValueSet(theValidationSupportContext, theOptions, theValueSetUrl, theCodeSystem, theCode);
haveValidated = true;
}
@ -127,7 +128,7 @@ public class TermReadSvcR4 extends BaseTermReadSvcImpl implements ITermReadSvcR4
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return super.lookupCode(theSystem, theCode);
}

View File

@ -3,6 +3,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
@ -60,7 +61,7 @@ public class TermReadSvcR5 extends BaseTermReadSvcImpl implements IValidationSup
@Override
@Transactional(dontRollbackOn = {ExpansionTooCostlyException.class})
public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
public ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
ValueSet valueSetToExpand = (ValueSet) theValueSetToExpand;
org.hl7.fhir.r4.model.ValueSet expandedR4 = super.expandValueSet(theExpansionOptions, org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(valueSetToExpand));
return new ValueSetExpansionOutcome(org.hl7.fhir.convertors.conv40_50.ValueSet40_50.convertValueSet(expandedR4));
@ -86,12 +87,12 @@ public class TermReadSvcR5 extends BaseTermReadSvcImpl implements IValidationSup
}
@Override
public IValidationSupport.CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public IValidationSupport.CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
Optional<VersionIndependentConcept> codeOpt = Optional.empty();
boolean haveValidated = false;
if (isNotBlank(theValueSetUrl)) {
codeOpt = super.validateCodeInValueSet(theRootValidationSupport, theOptions, theValueSetUrl, theCodeSystem, theCode);
codeOpt = super.validateCodeInValueSet(theValidationSupportContext, theOptions, theValueSetUrl, theCodeSystem, theCode);
haveValidated = true;
}
@ -116,7 +117,7 @@ public class TermReadSvcR5 extends BaseTermReadSvcImpl implements IValidationSup
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return super.lookupCode(theSystem, theCode);
}

View File

@ -1,5 +1,6 @@
package ca.uhn.fhir.jpa.dao.r4;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.util.TestUtil;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport;
@ -34,7 +35,7 @@ public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test {
ValidationSupportChain chain = new ValidationSupportChain(defaultSupport, snapshotGenerator);
// Generate the snapshot
StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(chain, differential, "http://foo", null, "THE BEST PROFILE");
StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(new ValidationSupportContext(chain), differential, "http://foo", null, "THE BEST PROFILE");
String url = "http://foo";
String webUrl = null;
@ -42,7 +43,7 @@ public class FhirResourceDaoR4StructureDefinitionTest extends BaseJpaR4Test {
StructureDefinition output = myStructureDefinitionDao.generateSnapshot(differential, url, webUrl, name);
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(output));
assertEquals(51, output.getSnapshot().getElement().size());
assertEquals(54, output.getSnapshot().getElement().size());
}

View File

@ -50,7 +50,7 @@ public class ResourceProviderR4StructureDefinitionTest extends BaseResourceProvi
.withParameter(Parameters.class, "definition", sd)
.returnResourceType(StructureDefinition.class)
.execute();
assertEquals(51, response.getSnapshot().getElement().size());
assertEquals(54, response.getSnapshot().getElement().size());
}
@Test
@ -65,7 +65,7 @@ public class ResourceProviderR4StructureDefinitionTest extends BaseResourceProvi
.withNoParameters(Parameters.class)
.returnResourceType(StructureDefinition.class)
.execute();
assertEquals(51, response.getSnapshot().getElement().size());
assertEquals(54, response.getSnapshot().getElement().size());
}
@Test
@ -80,7 +80,7 @@ public class ResourceProviderR4StructureDefinitionTest extends BaseResourceProvi
.withParameter(Parameters.class, "url", new StringType("http://example.com/fhir/StructureDefinition/patient-1a-extensions"))
.returnResourceType(StructureDefinition.class)
.execute();
assertEquals(51, response.getSnapshot().getElement().size());
assertEquals(54, response.getSnapshot().getElement().size());
}
@Test

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test;
import ca.uhn.fhir.jpa.entity.TermConcept;
@ -368,7 +369,7 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test {
assertEquals("http://foo", outcome.getUrl());
assertEquals(CodeSystem.CodeSystemContentMode.NOTPRESENT, outcome.getContent());
IValidationSupport.LookupCodeResult lookup = myTermSvc.lookupCode(myValidationSupport, "http://foo", "CBC");
IValidationSupport.LookupCodeResult lookup = myTermSvc.lookupCode(new ValidationSupportContext(myValidationSupport), "http://foo", "CBC");
assertEquals("Complete Blood Count", lookup.getCodeDisplay());
}
@ -426,7 +427,7 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test {
UploadStatistics outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", delta);
assertEquals(2, outcome.getUpdatedConceptCount());
assertEquals("CODEA0", myTermSvc.lookupCode(myValidationSupport, "http://foo", "codea").getCodeDisplay());
assertEquals("CODEA0", myTermSvc.lookupCode(new ValidationSupportContext(myValidationSupport), "http://foo", "codea").getCodeDisplay());
// Add codes again with different display
delta = new CustomTerminologySet();
@ -434,12 +435,12 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test {
delta.addRootConcept("codeb", "CODEB1");
outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", delta);
assertEquals(2, outcome.getUpdatedConceptCount());
assertEquals("CODEA1", myTermSvc.lookupCode(myValidationSupport, "http://foo", "codea").getCodeDisplay());
assertEquals("CODEA1", myTermSvc.lookupCode(new ValidationSupportContext(myValidationSupport), "http://foo", "codea").getCodeDisplay());
// Add codes again with no changes
outcome = myTermCodeSystemStorageSvc.applyDeltaCodeSystemsAdd("http://foo", delta);
assertEquals(2, outcome.getUpdatedConceptCount());
assertEquals("CODEA1", myTermSvc.lookupCode(myValidationSupport, "http://foo", "codea").getCodeDisplay());
assertEquals("CODEA1", myTermSvc.lookupCode(new ValidationSupportContext(myValidationSupport), "http://foo", "codea").getCodeDisplay());
}
@Test
@ -476,7 +477,7 @@ public class TerminologySvcDeltaR4Test extends BaseJpaR4Test {
.setCode("useless_sct_code")
.setValue(new Coding("http://snomed.info", "1234567", "Choked on large meal (finding)"));
IValidationSupport.LookupCodeResult result = myTermSvc.lookupCode(myValidationSupport, "http://foo/cs", "lunch");
IValidationSupport.LookupCodeResult result = myTermSvc.lookupCode(new ValidationSupportContext(myValidationSupport), "http://foo/cs", "lunch");
assertEquals(true, result.isFound());
assertEquals("lunch", result.getSearchedForCode());
assertEquals("http://foo/cs", result.getSearchedForSystem());

View File

@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test;
import ca.uhn.fhir.jpa.entity.TermCodeSystem;
@ -1950,7 +1951,7 @@ public class TerminologySvcImplDstu3Test extends BaseJpaDstu3Test {
@Ignore
public void testValidateCodeWithProperties() {
createCodeSystem();
IValidationSupport.CodeValidationResult code = myValidationSupport.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "childAAB", null, null);
IValidationSupport.CodeValidationResult code = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), new ConceptValidationOptions(), CS_URL, "childAAB", null, null);
assertEquals(true, code.isOk());
assertEquals(2, code.getProperties().size());
}

View File

@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.term;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
import ca.uhn.fhir.jpa.api.model.TranslationRequest;
import ca.uhn.fhir.jpa.entity.TermConceptMap;
@ -1776,10 +1777,10 @@ public class TerminologySvcImplR4Test extends BaseTermR4Test {
public void testValidateCode() {
createCodeSystem();
IValidationSupport.CodeValidationResult validation = myTermSvc.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "ParentWithNoChildrenA", null, null);
IValidationSupport.CodeValidationResult validation = myTermSvc.validateCode(new ValidationSupportContext(myValidationSupport), new ConceptValidationOptions(), CS_URL, "ParentWithNoChildrenA", null, null);
assertEquals(true, validation.isOk());
validation = myTermSvc.validateCode(myValidationSupport, new ConceptValidationOptions(), CS_URL, "ZZZZZZZ", null, null);
validation = myTermSvc.validateCode(new ValidationSupportContext(myValidationSupport), new ConceptValidationOptions(), CS_URL, "ZZZZZZZ", null, null);
assertEquals(false, validation.isOk());
}

View File

@ -3,12 +3,22 @@ package org.hl7.fhir.dstu2016may.hapi.validation;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.api.Constants;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.dstu2016may.formats.IParser;
import org.hl7.fhir.dstu2016may.formats.ParserType;
import org.hl7.fhir.dstu2016may.model.*;
import org.hl7.fhir.dstu2016may.model.CodeSystem;
import org.hl7.fhir.dstu2016may.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.dstu2016may.model.CodeType;
import org.hl7.fhir.dstu2016may.model.CodeableConcept;
import org.hl7.fhir.dstu2016may.model.Coding;
import org.hl7.fhir.dstu2016may.model.ConceptMap;
import org.hl7.fhir.dstu2016may.model.OperationOutcome;
import org.hl7.fhir.dstu2016may.model.Resource;
import org.hl7.fhir.dstu2016may.model.ResourceType;
import org.hl7.fhir.dstu2016may.model.StructureDefinition;
import org.hl7.fhir.dstu2016may.model.ValueSet;
import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptReferenceComponent;
import org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionComponent;
@ -24,7 +34,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@ -142,7 +151,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
if (myValidationSupport == null) {
return false;
} else {
return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem);
return myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), theSystem);
}
}
@ -175,7 +184,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) {
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, new ConceptValidationOptions(), theSystem, theCode, theDisplay, null);
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), new ConceptValidationOptions(), theSystem, theCode, theDisplay, null);
if (result == null) {
return null;
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.dstu3.hapi.ctx;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.util.CoverageIgnore;
import com.github.benmanes.caffeine.cache.Cache;
@ -12,8 +13,17 @@ import org.apache.commons.lang3.time.DateUtils;
import org.hl7.fhir.dstu3.context.IWorkerContext;
import org.hl7.fhir.dstu3.formats.IParser;
import org.hl7.fhir.dstu3.formats.ParserType;
import org.hl7.fhir.dstu3.model.*;
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.ExpansionProfile;
import org.hl7.fhir.dstu3.model.MetadataResource;
import org.hl7.fhir.dstu3.model.Resource;
import org.hl7.fhir.dstu3.model.ResourceType;
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;
import org.hl7.fhir.dstu3.terminologies.ValueSetExpander;
@ -31,7 +41,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@ -75,7 +84,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
public ValueSetExpansionComponent expandVS(ConceptSetComponent theInc, boolean theHierarchical) {
ValueSet input = new ValueSet();
input.getCompose().addInclude(theInc);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(myValidationSupport, null, input);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
ValueSet outputValueSet = (ValueSet) output.getValueSet();
if (outputValueSet != null) {
return outputValueSet.getExpansion();
@ -239,7 +248,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
if (myValidationSupport == null) {
return false;
} else {
return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem);
return myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), theSystem);
}
}
@ -273,7 +282,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValidationResult validateCode(String theSystem, String theCode, String theDisplay) {
ValidationOptions options = new ValidationOptions();
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, null);
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(options), theSystem, theCode, theDisplay, null);
if (result == null) {
return null;
}
@ -305,9 +314,9 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
IValidationSupport.CodeValidationResult outcome;
ValidationOptions options = new ValidationOptions();
if (isNotBlank(theVs.getUrl())) {
outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs.getUrl());
outcome = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs.getUrl());
} else {
outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs);
outcome = myValidationSupport.validateCodeInValueSet(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(options), theSystem, theCode, theDisplay, theVs);
}
if (outcome != null && outcome.isOk()) {

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.r4.hapi.ctx;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.util.CoverageIgnore;
import com.github.benmanes.caffeine.cache.Cache;
@ -15,9 +16,19 @@ import org.hl7.fhir.exceptions.TerminologyServiceException;
import org.hl7.fhir.r4.context.IWorkerContext;
import org.hl7.fhir.r4.formats.IParser;
import org.hl7.fhir.r4.formats.ParserType;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.CodeSystem;
import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.r4.model.CodeableConcept;
import org.hl7.fhir.r4.model.Coding;
import org.hl7.fhir.r4.model.ConceptMap;
import org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent;
import org.hl7.fhir.r4.model.MetadataResource;
import org.hl7.fhir.r4.model.Parameters;
import org.hl7.fhir.r4.model.Resource;
import org.hl7.fhir.r4.model.ResourceType;
import org.hl7.fhir.r4.model.StructureDefinition;
import org.hl7.fhir.r4.model.StructureMap;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r4.terminologies.ValueSetExpander;
import org.hl7.fhir.r4.utils.IResourceValidator;
@ -139,7 +150,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
if (myValidationSupport == null) {
return false;
} else {
return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem);
return myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), theSystem);
}
}
@ -172,7 +183,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) {
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null);
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null);
if (result == null) {
return null;
}
@ -197,9 +208,9 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
IValidationSupport.CodeValidationResult outcome;
if (isNotBlank(theVs.getUrl())) {
outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl());
outcome = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl());
} else {
outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs);
outcome = myValidationSupport.validateCodeInValueSet(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs);
}
if (outcome != null && outcome.isOk()) {
@ -254,7 +265,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical) throws TerminologyServiceException {
ValueSet input = new ValueSet();
input.getCompose().addInclude(theInc);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(myValidationSupport, null, input);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.r5.hapi.ctx;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.util.CoverageIgnore;
import com.github.benmanes.caffeine.cache.Cache;
@ -37,8 +38,6 @@ import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -52,7 +51,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
public final class HapiWorkerContext extends I18nBase implements IWorkerContext {
private final FhirContext myCtx;
private final Cache<String, Resource> myFetchedResourceCache;
private IValidationSupport myValidationSupport;
private final IValidationSupport myValidationSupport;
private Parameters myExpansionProfile;
private String myOverrideVersionNs;
@ -147,7 +146,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
if (myValidationSupport == null) {
return false;
} else {
return myValidationSupport.isCodeSystemSupported(myValidationSupport, theSystem);
return myValidationSupport.isCodeSystemSupported(new ValidationSupportContext(myValidationSupport), theSystem);
}
}
@ -174,7 +173,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) {
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null);
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null);
if (result == null) {
return null;
}
@ -191,9 +190,9 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
IValidationSupport.CodeValidationResult outcome;
if (isNotBlank(theVs.getUrl())) {
outcome = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl());
outcome = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs.getUrl());
} else {
outcome = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs);
outcome = myValidationSupport.validateCodeInValueSet(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, theVs);
}
if (outcome != null && outcome.isOk()) {
@ -219,7 +218,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
@Override
public void generateSnapshot(StructureDefinition p) throws FHIRException {
myValidationSupport.generateSnapshot(myValidationSupport, p, "", "", "");
myValidationSupport.generateSnapshot(new ValidationSupportContext(myValidationSupport), p, "", "", "");
}
@Override
@ -252,7 +251,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical) throws TerminologyServiceException {
ValueSet input = new ValueSet();
input.getCompose().addInclude(theInc);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(myValidationSupport, null, input);
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
}
@ -407,7 +406,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
}
@Override
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FileNotFoundException, IOException, FHIRException {
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException {
throw new UnsupportedOperationException();
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBaseResource;
@ -48,28 +49,28 @@ public class BaseValidationSupportWrapper extends BaseValidationSupport {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
return myWrap.isCodeSystemSupported(myWrap, theSystem);
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return myWrap.isCodeSystemSupported(theValidationSupportContext, theSystem);
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
return myWrap.validateCode(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl);
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
return myWrap.validateCode(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl);
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
return myWrap.lookupCode(theRootValidationSupport, theSystem, theCode);
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return myWrap.lookupCode(theValidationSupportContext, theSystem, theCode);
}
@Override
public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
return myWrap.isValueSetSupported(myWrap, theValueSetUrl);
public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
return myWrap.isValueSetSupported(theValidationSupportContext, theValueSetUrl);
}
@Override
public IValidationSupport.ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
return myWrap.expandValueSet(theRootValidationSupport, null, theValueSetToExpand);
public IValidationSupport.ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
return myWrap.expandValueSet(theValidationSupportContext, null, theValueSetToExpand);
}
@Override
@ -89,13 +90,13 @@ public class BaseValidationSupportWrapper extends BaseValidationSupport {
}
@Override
public IBaseResource generateSnapshot(IValidationSupport theRootValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
return myWrap.generateSnapshot(theRootValidationSupport, theInput, theUrl, theWebUrl, theProfileName);
public IBaseResource generateSnapshot(ValidationSupportContext theValidationSupportContext, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
return myWrap.generateSnapshot(theValidationSupportContext, theInput, theUrl, theWebUrl, theProfileName);
}
@Override
public IValidationSupport.CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theValidationOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
return myWrap.validateCodeInValueSet(theRootValidationSupport, theValidationOptions, theCodeSystem, theCode, theDisplay, theValueSet);
public IValidationSupport.CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theValidationOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
return myWrap.validateCodeInValueSet(theValidationSupportContext, theValidationOptions, theCodeSystem, theCode, theDisplay, theValueSet);
}

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.checkerframework.checker.nullness.qual.Nullable;
@ -63,23 +64,23 @@ public class CachingValidationSupport extends BaseValidationSupportWrapper imple
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
String key = "isCodeSystemSupported " + theSystem;
Boolean retVal = loadFromCache(myCache, key, t -> super.isCodeSystemSupported(theRootValidationSupport, theSystem));
Boolean retVal = loadFromCache(myCache, key, t -> super.isCodeSystemSupported(theValidationSupportContext, theSystem));
assert retVal != null;
return retVal;
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
String key = "validateCode " + theCodeSystem + " " + theCode + " " + defaultIfBlank(theValueSetUrl, "NO_VS");
return loadFromCache(myValidateCodeCache, key, t -> super.validateCode(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl));
return loadFromCache(myValidateCodeCache, key, t -> super.validateCode(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl));
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
String key = "lookupCode " + theSystem + " " + theCode;
return loadFromCache(myLookupCodeCache, key, t -> super.lookupCode(theRootValidationSupport, theSystem, theCode));
return loadFromCache(myLookupCodeCache, key, t -> super.lookupCode(theValidationSupportContext, theSystem, theCode));
}
@SuppressWarnings("OptionalAssignedToNull")

View File

@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.util.ClasspathUtil;
import org.apache.commons.lang3.Validate;
import org.fhir.ucum.UcumEssenceService;
@ -56,13 +57,13 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
}
@Override
public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
String url = getValueSetUrl(theValueSet);
return validateCode(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, url);
return validateCode(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, url);
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
/* **************************************************************************************
* NOTE: Update validation_support_modules.html if any of the support in this module
* changes in any way!
@ -93,7 +94,7 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
if (system == null && theOptions.isInferSystem()) {
system = UCUM_CODESYSTEM_URL;
}
CodeValidationResult validationResult = validateLookupCode(theRootValidationSupport, theCode, system);
CodeValidationResult validationResult = validateLookupCode(theValidationSupportContext, theCode, system);
if (validationResult != null) {
return validationResult;
}
@ -116,7 +117,7 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
}
if (isBlank(theValueSetUrl)) {
CodeValidationResult validationResult = validateLookupCode(theRootValidationSupport, theCode, theCodeSystem);
CodeValidationResult validationResult = validateLookupCode(theValidationSupportContext, theCode, theCodeSystem);
if (validationResult != null) {
return validationResult;
}
@ -126,8 +127,8 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
}
@Nullable
public CodeValidationResult validateLookupCode(IValidationSupport theRootValidationSupport, String theCode, String theSystem) {
LookupCodeResult lookupResult = lookupCode(theRootValidationSupport, theSystem, theCode);
public CodeValidationResult validateLookupCode(ValidationSupportContext theValidationSupportContext, String theCode, String theSystem) {
LookupCodeResult lookupResult = lookupCode(theValidationSupportContext, theSystem, theCode);
CodeValidationResult validationResult = null;
if (lookupResult != null) {
if (lookupResult.isFound()) {
@ -141,9 +142,9 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
if (UCUM_CODESYSTEM_URL.equals(theSystem) && theRootValidationSupport.getFhirContext().getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) {
if (UCUM_CODESYSTEM_URL.equals(theSystem) && theValidationSupportContext.getRootValidationSupport().getFhirContext().getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU3)) {
InputStream input = ClasspathUtil.loadResourceAsStream("/ucum-essence.xml");
try {
@ -172,7 +173,7 @@ public class CommonCodeSystemsTerminologyService implements IValidationSupport {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
switch (theSystem) {
case UCUM_CODESYSTEM_URL:

View File

@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.util.VersionIndependentConcept;
import org.apache.commons.lang3.Validate;
@ -52,9 +53,9 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
@Override
public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
public ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
org.hl7.fhir.r5.model.ValueSet expansionR5 = expandValueSetToCanonical(theRootValidationSupport, theValueSetToExpand, null, null);
org.hl7.fhir.r5.model.ValueSet expansionR5 = expandValueSetToCanonical(theValidationSupportContext, theValueSetToExpand, null, null);
if (expansionR5 == null) {
return null;
}
@ -86,24 +87,24 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
return new ValueSetExpansionOutcome(expansion, null);
}
private org.hl7.fhir.r5.model.ValueSet expandValueSetToCanonical(IValidationSupport theRootValidationSupport, IBaseResource theValueSetToExpand, @Nullable String theWantSystem, @Nullable String theWantCode) {
private org.hl7.fhir.r5.model.ValueSet expandValueSetToCanonical(ValidationSupportContext theValidationSupportContext, IBaseResource theValueSetToExpand, @Nullable String theWantSystem, @Nullable String theWantCode) {
org.hl7.fhir.r5.model.ValueSet expansionR5;
switch (myCtx.getVersion().getVersion()) {
case DSTU2:
case DSTU2_HL7ORG: {
expansionR5 = expandValueSetDstu2Hl7Org(theRootValidationSupport, (ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
expansionR5 = expandValueSetDstu2Hl7Org(theValidationSupportContext, (ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
break;
}
case DSTU3: {
expansionR5 = expandValueSetDstu3(theRootValidationSupport, (org.hl7.fhir.dstu3.model.ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
expansionR5 = expandValueSetDstu3(theValidationSupportContext, (org.hl7.fhir.dstu3.model.ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
break;
}
case R4: {
expansionR5 = expandValueSetR4(theRootValidationSupport, (org.hl7.fhir.r4.model.ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
expansionR5 = expandValueSetR4(theValidationSupportContext, (org.hl7.fhir.r4.model.ValueSet) theValueSetToExpand, theWantSystem, theWantCode);
break;
}
case R5: {
expansionR5 = expandValueSetR5(theRootValidationSupport, (org.hl7.fhir.r5.model.ValueSet) theValueSetToExpand);
expansionR5 = expandValueSetR5(theValidationSupportContext, (org.hl7.fhir.r5.model.ValueSet) theValueSetToExpand);
break;
}
case DSTU2_1:
@ -118,20 +119,20 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
@Override
public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
org.hl7.fhir.r5.model.ValueSet expansion = expandValueSetToCanonical(theRootValidationSupport, theValueSet, theCodeSystem, theCode);
public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
org.hl7.fhir.r5.model.ValueSet expansion = expandValueSetToCanonical(theValidationSupportContext, theValueSet, theCodeSystem, theCode);
if (expansion == null) {
return null;
}
return validateCodeInExpandedValueSet(theRootValidationSupport, theOptions, theCodeSystem, theCode, expansion);
return validateCodeInExpandedValueSet(theValidationSupportContext, theOptions, theCodeSystem, theCode, expansion);
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
IBaseResource vs;
if (isNotBlank(theValueSetUrl)) {
vs = theRootValidationSupport.fetchValueSet(theValueSetUrl);
vs = theValidationSupportContext.getRootValidationSupport().fetchValueSet(theValueSetUrl);
if (vs == null) {
return null;
}
@ -164,24 +165,24 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
}
ValueSetExpansionOutcome valueSetExpansionOutcome = expandValueSet(theRootValidationSupport, null, vs);
ValueSetExpansionOutcome valueSetExpansionOutcome = expandValueSet(theValidationSupportContext, null, vs);
if (valueSetExpansionOutcome == null) {
return null;
}
IBaseResource expansion = valueSetExpansionOutcome.getValueSet();
return validateCodeInExpandedValueSet(theRootValidationSupport, theOptions, theCodeSystem, theCode, expansion);
return validateCodeInExpandedValueSet(theValidationSupportContext, theOptions, theCodeSystem, theCode, expansion);
}
private CodeValidationResult validateCodeInExpandedValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, IBaseResource theExpansion) {
private CodeValidationResult validateCodeInExpandedValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, IBaseResource theExpansion) {
assert theExpansion != null;
boolean caseSensitive = true;
IBaseResource system = null;
if (!theOptions.isInferSystem() && isNotBlank(theCodeSystem)) {
system = theRootValidationSupport.fetchCodeSystem(theCodeSystem);
system = theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(theCodeSystem);
if (system == null) {
return null;
}
@ -283,36 +284,36 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
return validateCode(theRootValidationSupport, new ConceptValidationOptions(), theSystem, theCode, null, null).asLookupCodeResult(theSystem, theCode);
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
return validateCode(theValidationSupportContext, new ConceptValidationOptions(), theSystem, theCode, null, null).asLookupCodeResult(theSystem, theCode);
}
@Nullable
private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu2Hl7Org(IValidationSupport theRootValidationSupport, ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu2Hl7Org(ValidationSupportContext theValidationSupportContext, ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
Function<String, CodeSystem> codeSystemLoader = t -> {
org.hl7.fhir.dstu2.model.ValueSet codeSystem = (org.hl7.fhir.dstu2.model.ValueSet) theRootValidationSupport.fetchCodeSystem(t);
org.hl7.fhir.dstu2.model.ValueSet codeSystem = (org.hl7.fhir.dstu2.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
CodeSystem retVal = new CodeSystem();
addCodesDstu2Hl7Org(codeSystem.getCodeSystem().getConcept(), retVal.getConcept());
return retVal;
};
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> {
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theRootValidationSupport.fetchValueSet(t);
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
return ValueSet10_50.convertValueSet(valueSet);
};
org.hl7.fhir.r5.model.ValueSet input = ValueSet10_50.convertValueSet(theInput);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theRootValidationSupport, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theValidationSupportContext, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
return (output);
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
if (isBlank(theSystem)) {
return false;
}
IBaseResource cs = theRootValidationSupport.fetchCodeSystem(theSystem);
IBaseResource cs = theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(theSystem);
if (!myCtx.getVersion().getVersion().isEqualOrNewerThan(FhirVersionEnum.DSTU2_1)) {
return cs != null;
@ -329,8 +330,8 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
@Override
public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
return isNotBlank(theValueSetUrl) && theRootValidationSupport.fetchValueSet(theValueSetUrl) != null;
public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
return isNotBlank(theValueSetUrl) && theValidationSupportContext.getRootValidationSupport().fetchValueSet(theValueSetUrl) != null;
}
@ -343,52 +344,52 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
}
@Nullable
private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu3(IValidationSupport theRootValidationSupport, org.hl7.fhir.dstu3.model.ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
private org.hl7.fhir.r5.model.ValueSet expandValueSetDstu3(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.dstu3.model.ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> {
org.hl7.fhir.dstu3.model.CodeSystem codeSystem = (org.hl7.fhir.dstu3.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t);
org.hl7.fhir.dstu3.model.CodeSystem codeSystem = (org.hl7.fhir.dstu3.model.CodeSystem) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
return CodeSystem30_50.convertCodeSystem(codeSystem);
};
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> {
org.hl7.fhir.dstu3.model.ValueSet valueSet = (org.hl7.fhir.dstu3.model.ValueSet) theRootValidationSupport.fetchValueSet(t);
org.hl7.fhir.dstu3.model.ValueSet valueSet = (org.hl7.fhir.dstu3.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
return ValueSet30_50.convertValueSet(valueSet);
};
org.hl7.fhir.r5.model.ValueSet input = ValueSet30_50.convertValueSet(theInput);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theRootValidationSupport, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theValidationSupportContext, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
return (output);
}
@Nullable
private org.hl7.fhir.r5.model.ValueSet expandValueSetR4(IValidationSupport theRootValidationSupport, org.hl7.fhir.r4.model.ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
private org.hl7.fhir.r5.model.ValueSet expandValueSetR4(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.r4.model.ValueSet theInput, @Nullable String theWantSystem, @Nullable String theWantCode) {
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> {
org.hl7.fhir.r4.model.CodeSystem codeSystem = (org.hl7.fhir.r4.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t);
org.hl7.fhir.r4.model.CodeSystem codeSystem = (org.hl7.fhir.r4.model.CodeSystem) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
return CodeSystem40_50.convertCodeSystem(codeSystem);
};
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> {
org.hl7.fhir.r4.model.ValueSet valueSet = (org.hl7.fhir.r4.model.ValueSet) theRootValidationSupport.fetchValueSet(t);
org.hl7.fhir.r4.model.ValueSet valueSet = (org.hl7.fhir.r4.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
return ValueSet40_50.convertValueSet(valueSet);
};
org.hl7.fhir.r5.model.ValueSet input = ValueSet40_50.convertValueSet(theInput);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theRootValidationSupport, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
org.hl7.fhir.r5.model.ValueSet output = expandValueSetR5(theValidationSupportContext, input, codeSystemLoader, valueSetLoader, theWantSystem, theWantCode);
return (output);
}
@Nullable
private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(IValidationSupport theRootValidationSupport, org.hl7.fhir.r5.model.ValueSet theInput) {
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> (org.hl7.fhir.r5.model.CodeSystem) theRootValidationSupport.fetchCodeSystem(t);
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> (org.hl7.fhir.r5.model.ValueSet) theRootValidationSupport.fetchValueSet(t);
private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.r5.model.ValueSet theInput) {
Function<String, org.hl7.fhir.r5.model.CodeSystem> codeSystemLoader = t -> (org.hl7.fhir.r5.model.CodeSystem) theValidationSupportContext.getRootValidationSupport().fetchCodeSystem(t);
Function<String, org.hl7.fhir.r5.model.ValueSet> valueSetLoader = t -> (org.hl7.fhir.r5.model.ValueSet) theValidationSupportContext.getRootValidationSupport().fetchValueSet(t);
return expandValueSetR5(theRootValidationSupport, theInput, codeSystemLoader, valueSetLoader, null, null);
return expandValueSetR5(theValidationSupportContext, theInput, codeSystemLoader, valueSetLoader, null, null);
}
@Nullable
private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(IValidationSupport theRootValidationSupport, org.hl7.fhir.r5.model.ValueSet theInput, Function<String, CodeSystem> theCodeSystemLoader, Function<String, org.hl7.fhir.r5.model.ValueSet> theValueSetLoader, @Nullable String theWantSystem, @Nullable String theWantCode) {
private org.hl7.fhir.r5.model.ValueSet expandValueSetR5(ValidationSupportContext theValidationSupportContext, org.hl7.fhir.r5.model.ValueSet theInput, Function<String, CodeSystem> theCodeSystemLoader, Function<String, org.hl7.fhir.r5.model.ValueSet> theValueSetLoader, @Nullable String theWantSystem, @Nullable String theWantCode) {
Set<VersionIndependentConcept> concepts = new HashSet<>();
try {
expandValueSetR5IncludeOrExclude(theRootValidationSupport, concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getInclude(), true, theWantSystem, theWantCode);
expandValueSetR5IncludeOrExclude(theRootValidationSupport, concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getExclude(), false, theWantSystem, theWantCode);
expandValueSetR5IncludeOrExclude(theValidationSupportContext, concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getInclude(), true, theWantSystem, theWantCode);
expandValueSetR5IncludeOrExclude(theValidationSupportContext, concepts, theCodeSystemLoader, theValueSetLoader, theInput.getCompose().getExclude(), false, theWantSystem, theWantCode);
} catch (ExpansionCouldNotBeCompletedInternallyException e) {
return null;
}
@ -404,7 +405,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
return retVal;
}
private void expandValueSetR5IncludeOrExclude(IValidationSupport theRootValidationSupport, Set<VersionIndependentConcept> theConcepts, Function<String, CodeSystem> theCodeSystemLoader, Function<String, org.hl7.fhir.r5.model.ValueSet> theValueSetLoader, List<org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent> theComposeList, boolean theComposeListIsInclude, @Nullable String theWantSystem, @Nullable String theWantCode) throws ExpansionCouldNotBeCompletedInternallyException {
private void expandValueSetR5IncludeOrExclude(ValidationSupportContext theValidationSupportContext, Set<VersionIndependentConcept> theConcepts, Function<String, CodeSystem> theCodeSystemLoader, Function<String, org.hl7.fhir.r5.model.ValueSet> theValueSetLoader, List<org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent> theComposeList, boolean theComposeListIsInclude, @Nullable String theWantSystem, @Nullable String theWantCode) throws ExpansionCouldNotBeCompletedInternallyException {
for (org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent nextInclude : theComposeList) {
List<VersionIndependentConcept> nextCodeList = new ArrayList<>();
@ -430,7 +431,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
if (codeSystem == null) {
if (theWantCode != null) {
LookupCodeResult lookup = theRootValidationSupport.lookupCode(theRootValidationSupport, system, theWantCode);
LookupCodeResult lookup = theValidationSupportContext.getRootValidationSupport().lookupCode(theValidationSupportContext, system, theWantCode);
if (lookup != null && lookup.isFound()) {
CodeSystem.ConceptDefinitionComponent conceptDefinition = new CodeSystem.ConceptDefinitionComponent()
.addConcept()
@ -467,7 +468,7 @@ public class InMemoryTerminologyServerValidationSupport implements IValidationSu
for (CanonicalType nextValueSetInclude : nextInclude.getValueSet()) {
org.hl7.fhir.r5.model.ValueSet vs = theValueSetLoader.apply(nextValueSetInclude.getValueAsString());
if (vs != null) {
org.hl7.fhir.r5.model.ValueSet subExpansion = expandValueSetR5(theRootValidationSupport, vs, theCodeSystemLoader, theValueSetLoader, theWantSystem, theWantCode);
org.hl7.fhir.r5.model.ValueSet subExpansion = expandValueSetR5(theValidationSupportContext, vs, theCodeSystemLoader, theValueSetLoader, theWantSystem, theWantCode);
if (subExpansion == null) {
throw new ExpansionCouldNotBeCompletedInternallyException();
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseResource;
@ -178,12 +179,12 @@ public class PrePopulatedValidationSupport extends BaseStaticResourceValidationS
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
return myCodeSystems.containsKey(theSystem);
}
@Override
public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
return myValueSets.containsKey(theValueSetUrl);
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.util.ParametersUtil;
import org.apache.commons.lang3.Validate;
@ -37,7 +38,7 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, theValueSetUrl, null);
}
@ -50,7 +51,7 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
}
@Override
public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
return invokeRemoteValidateCode(theCodeSystem, theCode, theDisplay, null, theValueSet);
}

View File

@ -1,17 +1,20 @@
package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeCompositeDatatypeDefinition;
import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.common.hapi.validation.validator.ProfileKnowledgeWorkerR5;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.common.hapi.validation.validator.VersionSpecificWorkerContextWrapper;
import org.hl7.fhir.common.hapi.validation.validator.VersionTypeConverterDstu3;
import org.hl7.fhir.common.hapi.validation.validator.VersionTypeConverterR4;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
@ -26,6 +29,7 @@ import java.util.ArrayList;
* </ul>
*/
public class SnapshotGeneratingValidationSupport implements IValidationSupport {
private static final Logger ourLog = LoggerFactory.getLogger(SnapshotGeneratingValidationSupport.class);
private final FhirContext myCtx;
/**
@ -36,59 +40,85 @@ public class SnapshotGeneratingValidationSupport implements IValidationSupport {
myCtx = theCtx;
}
@Override
public IBaseResource generateSnapshot(IValidationSupport theValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
public IBaseResource generateSnapshot(ValidationSupportContext theValidationSupportContext, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
assert theInput.getStructureFhirVersionEnum() == myCtx.getVersion().getVersion();
switch (theInput.getStructureFhirVersionEnum()) {
case DSTU3: {
org.hl7.fhir.dstu3.model.StructureDefinition input = (org.hl7.fhir.dstu3.model.StructureDefinition) theInput;
org.hl7.fhir.dstu3.context.IWorkerContext context = new org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext(myCtx, theValidationSupport);
org.hl7.fhir.dstu3.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new MyProfileKnowledgeWorkerDstu3();
ArrayList<ValidationMessage> messages = new ArrayList<>();
org.hl7.fhir.dstu3.model.StructureDefinition base = (org.hl7.fhir.dstu3.model.StructureDefinition) theValidationSupport.fetchStructureDefinition(input.getBaseDefinition());
if (base == null) {
throw new PreconditionFailedException("Unknown base definition: " + input.getBaseDefinition());
}
new org.hl7.fhir.dstu3.conformance.ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, input, theUrl, theProfileName);
break;
}
case R4: {
org.hl7.fhir.r4.model.StructureDefinition input = (org.hl7.fhir.r4.model.StructureDefinition) theInput;
org.hl7.fhir.r4.context.IWorkerContext context = new org.hl7.fhir.r4.hapi.ctx.HapiWorkerContext(myCtx, theValidationSupport);
org.hl7.fhir.r4.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new MyProfileKnowledgeWorkerR4();
ArrayList<ValidationMessage> messages = new ArrayList<>();
org.hl7.fhir.r4.model.StructureDefinition base = (org.hl7.fhir.r4.model.StructureDefinition) theValidationSupport.fetchStructureDefinition(input.getBaseDefinition());
if (base == null) {
throw new PreconditionFailedException("Unknown base definition: " + input.getBaseDefinition());
}
new org.hl7.fhir.r4.conformance.ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, input, theUrl, theWebUrl, theProfileName);
break;
}
case R5: {
org.hl7.fhir.r5.model.StructureDefinition input = (org.hl7.fhir.r5.model.StructureDefinition) theInput;
org.hl7.fhir.r5.context.IWorkerContext context = new org.hl7.fhir.r5.hapi.ctx.HapiWorkerContext(myCtx, theValidationSupport);
org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new ProfileKnowledgeWorkerR5(myCtx);
ArrayList<ValidationMessage> messages = new ArrayList<>();
org.hl7.fhir.r5.model.StructureDefinition base = (org.hl7.fhir.r5.model.StructureDefinition) theValidationSupport.fetchStructureDefinition(input.getBaseDefinition());
if (base == null) {
throw new PreconditionFailedException("Unknown base definition: " + input.getBaseDefinition());
}
new org.hl7.fhir.r5.conformance.ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(base, input, theUrl, theWebUrl, theProfileName);
break;
String inputUrl = null;
try {
assert theInput.getStructureFhirVersionEnum() == myCtx.getVersion().getVersion();
VersionSpecificWorkerContextWrapper.IVersionTypeConverter converter;
switch (theInput.getStructureFhirVersionEnum()) {
case DSTU3:
converter = new VersionTypeConverterDstu3();
break;
case R4:
converter = new VersionTypeConverterR4();
break;
case R5:
converter = VersionSpecificWorkerContextWrapper.IDENTITY_VERSION_TYPE_CONVERTER;
break;
case DSTU2:
case DSTU2_HL7ORG:
case DSTU2_1:
default:
throw new IllegalStateException("Can not generate snapshot for version: " + theInput.getStructureFhirVersionEnum());
}
// NOTE: Add to the class javadoc if you add to this
case DSTU2:
case DSTU2_HL7ORG:
case DSTU2_1:
default:
throw new IllegalStateException("Can not generate snapshot for version: " + theInput.getStructureFhirVersionEnum());
org.hl7.fhir.r5.model.StructureDefinition inputCanonical = (org.hl7.fhir.r5.model.StructureDefinition) converter.toCanonical(theInput);
inputUrl = inputCanonical.getUrl();
if (theValidationSupportContext.getCurrentlyGeneratingSnapshots().contains(inputUrl)) {
ourLog.warn("Detected circular dependency, already generating snapshot for: {}", inputUrl);
return theInput;
}
theValidationSupportContext.getCurrentlyGeneratingSnapshots().add(inputUrl);
IBaseResource base = theValidationSupportContext.getRootValidationSupport().fetchStructureDefinition(inputCanonical.getBaseDefinition());
if (base == null) {
throw new PreconditionFailedException("Unknown base definition: " + inputCanonical.getBaseDefinition());
}
org.hl7.fhir.r5.model.StructureDefinition baseCanonical = (org.hl7.fhir.r5.model.StructureDefinition) converter.toCanonical(base);
ArrayList<ValidationMessage> messages = new ArrayList<>();
org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new ProfileKnowledgeWorkerR5(myCtx);
IWorkerContext context = new VersionSpecificWorkerContextWrapper(theValidationSupportContext, converter);
new org.hl7.fhir.r5.conformance.ProfileUtilities(context, messages, profileKnowledgeProvider).generateSnapshot(baseCanonical, inputCanonical, theUrl, theWebUrl, theProfileName);
switch (theInput.getStructureFhirVersionEnum()) {
case DSTU3:
org.hl7.fhir.dstu3.model.StructureDefinition generatedDstu3 = (org.hl7.fhir.dstu3.model.StructureDefinition) converter.fromCanonical(inputCanonical);
((org.hl7.fhir.dstu3.model.StructureDefinition) theInput).getSnapshot().getElement().clear();
((org.hl7.fhir.dstu3.model.StructureDefinition) theInput).getSnapshot().getElement().addAll(generatedDstu3.getSnapshot().getElement());
break;
case R4:
org.hl7.fhir.r4.model.StructureDefinition generatedR4 = (org.hl7.fhir.r4.model.StructureDefinition) converter.fromCanonical(inputCanonical);
((org.hl7.fhir.r4.model.StructureDefinition) theInput).getSnapshot().getElement().clear();
((org.hl7.fhir.r4.model.StructureDefinition) theInput).getSnapshot().getElement().addAll(generatedR4.getSnapshot().getElement());
break;
case R5:
org.hl7.fhir.r5.model.StructureDefinition generatedR5 = (org.hl7.fhir.r5.model.StructureDefinition) converter.fromCanonical(inputCanonical);
((org.hl7.fhir.r5.model.StructureDefinition) theInput).getSnapshot().getElement().clear();
((org.hl7.fhir.r5.model.StructureDefinition) theInput).getSnapshot().getElement().addAll(generatedR5.getSnapshot().getElement());
break;
case DSTU2:
case DSTU2_HL7ORG:
case DSTU2_1:
default:
throw new IllegalStateException("Can not generate snapshot for version: " + theInput.getStructureFhirVersionEnum());
}
return theInput;
} catch (Exception e) {
throw new InternalErrorException("Failed to generate snapshot", e);
} finally {
if (inputUrl != null) {
theValidationSupportContext.getCurrentlyGeneratingSnapshots().remove(inputUrl);
}
}
return theInput;
}
@Override
@ -97,98 +127,4 @@ public class SnapshotGeneratingValidationSupport implements IValidationSupport {
}
private class MyProfileKnowledgeWorkerR4 implements org.hl7.fhir.r4.conformance.ProfileUtilities.ProfileKnowledgeProvider {
@Override
public boolean isDatatype(String typeSimple) {
BaseRuntimeElementDefinition<?> def = myCtx.getElementDefinition(typeSimple);
Validate.notNull(typeSimple);
return (def instanceof RuntimePrimitiveDatatypeDefinition) || (def instanceof RuntimeCompositeDatatypeDefinition);
}
@Override
public boolean isResource(String typeSimple) {
BaseRuntimeElementDefinition<?> def = myCtx.getElementDefinition(typeSimple);
Validate.notNull(typeSimple);
return def instanceof RuntimeResourceDefinition;
}
@Override
public boolean hasLinkFor(String typeSimple) {
return false;
}
@Override
public String getLinkFor(String corePath, String typeSimple) {
return null;
}
@Override
public BindingResolution resolveBinding(org.hl7.fhir.r4.model.StructureDefinition def, org.hl7.fhir.r4.model.ElementDefinition.ElementDefinitionBindingComponent binding, String path) throws FHIRException {
return null;
}
@Override
public BindingResolution resolveBinding(org.hl7.fhir.r4.model.StructureDefinition def, String url, String path) throws FHIRException {
return null;
}
@Override
public String getLinkForProfile(org.hl7.fhir.r4.model.StructureDefinition profile, String url) {
return null;
}
@Override
public boolean prependLinks() {
return false;
}
@Override
public String getLinkForUrl(String corePath, String url) {
throw new UnsupportedOperationException();
}
}
private class MyProfileKnowledgeWorkerDstu3 implements org.hl7.fhir.dstu3.conformance.ProfileUtilities.ProfileKnowledgeProvider {
@Override
public boolean isDatatype(String typeSimple) {
BaseRuntimeElementDefinition<?> def = myCtx.getElementDefinition(typeSimple);
Validate.notNull(typeSimple);
return (def instanceof RuntimePrimitiveDatatypeDefinition) || (def instanceof RuntimeCompositeDatatypeDefinition);
}
@Override
public boolean isResource(String typeSimple) {
BaseRuntimeElementDefinition<?> def = myCtx.getElementDefinition(typeSimple);
Validate.notNull(typeSimple);
return def instanceof RuntimeResourceDefinition;
}
@Override
public boolean hasLinkFor(String typeSimple) {
return false;
}
@Override
public String getLinkFor(String corePath, String typeSimple) {
return null;
}
@Override
public BindingResolution resolveBinding(org.hl7.fhir.dstu3.model.StructureDefinition theStructureDefinition, org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent theElementDefinitionBindingComponent, String theS) {
return null;
}
@Override
public String getLinkForProfile(org.hl7.fhir.dstu3.model.StructureDefinition theStructureDefinition, String theS) {
return null;
}
@Override
public boolean prependLinks() {
return false;
}
}
}

View File

@ -5,6 +5,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.instance.model.api.IBaseResource;
@ -49,9 +50,9 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public boolean isValueSetSupported(IValidationSupport theRootValidationSupport, String theValueSetUrl) {
public boolean isValueSetSupported(ValidationSupportContext theValidationSupportContext, String theValueSetUrl) {
for (IValidationSupport next : myChain) {
boolean retVal = next.isValueSetSupported(theRootValidationSupport, theValueSetUrl);
boolean retVal = next.isValueSetSupported(theValidationSupportContext, theValueSetUrl);
if (retVal) {
return true;
}
@ -60,9 +61,9 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public IBaseResource generateSnapshot(IValidationSupport theRootValidationSupport, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
public IBaseResource generateSnapshot(ValidationSupportContext theValidationSupportContext, IBaseResource theInput, String theUrl, String theWebUrl, String theProfileName) {
for (IValidationSupport next : myChain) {
IBaseResource retVal = next.generateSnapshot(theRootValidationSupport, theInput, theUrl, theWebUrl, theProfileName);
IBaseResource retVal = next.generateSnapshot(theValidationSupportContext, theInput, theUrl, theWebUrl, theProfileName);
if (retVal != null) {
return retVal;
}
@ -122,10 +123,10 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public ValueSetExpansionOutcome expandValueSet(IValidationSupport theRootValidationSupport, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
public ValueSetExpansionOutcome expandValueSet(ValidationSupportContext theValidationSupportContext, ValueSetExpansionOptions theExpansionOptions, IBaseResource theValueSetToExpand) {
for (IValidationSupport next : myChain) {
// TODO: test if code system is supported?
ValueSetExpansionOutcome expanded = next.expandValueSet(theRootValidationSupport, null, theValueSetToExpand);
ValueSetExpansionOutcome expanded = next.expandValueSet(theValidationSupportContext, null, theValueSetToExpand);
if (expanded != null) {
return expanded;
}
@ -210,9 +211,9 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public boolean isCodeSystemSupported(IValidationSupport theRootValidationSupport, String theSystem) {
public boolean isCodeSystemSupported(ValidationSupportContext theValidationSupportContext, String theSystem) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theRootValidationSupport, theSystem)) {
if (next.isCodeSystemSupported(theValidationSupportContext, theSystem)) {
return true;
}
}
@ -220,10 +221,10 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public CodeValidationResult validateCode(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
public CodeValidationResult validateCode(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) {
for (IValidationSupport next : myChain) {
if (theOptions.isInferSystem() || (theCodeSystem != null && next.isCodeSystemSupported(theRootValidationSupport, theCodeSystem))) {
CodeValidationResult retVal = next.validateCode(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl);
if (theOptions.isInferSystem() || (theCodeSystem != null && next.isCodeSystemSupported(theValidationSupportContext, theCodeSystem))) {
CodeValidationResult retVal = next.validateCode(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, theValueSetUrl);
if (retVal != null) {
return retVal;
}
@ -233,9 +234,9 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public CodeValidationResult validateCodeInValueSet(IValidationSupport theRootValidationSupport, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
public CodeValidationResult validateCodeInValueSet(ValidationSupportContext theValidationSupportContext, ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull IBaseResource theValueSet) {
for (IValidationSupport next : myChain) {
CodeValidationResult retVal = next.validateCodeInValueSet(theRootValidationSupport, theOptions, theCodeSystem, theCode, theDisplay, theValueSet);
CodeValidationResult retVal = next.validateCodeInValueSet(theValidationSupportContext, theOptions, theCodeSystem, theCode, theDisplay, theValueSet);
if (retVal != null) {
return retVal;
}
@ -244,10 +245,10 @@ public class ValidationSupportChain implements IValidationSupport {
}
@Override
public LookupCodeResult lookupCode(IValidationSupport theRootValidationSupport, String theSystem, String theCode) {
public LookupCodeResult lookupCode(ValidationSupportContext theValidationSupportContext, String theSystem, String theCode) {
for (IValidationSupport next : myChain) {
if (next.isCodeSystemSupported(theRootValidationSupport, theSystem)) {
return next.lookupCode(theRootValidationSupport, theSystem, theCode);
if (next.isCodeSystemSupported(theValidationSupportContext, theSystem)) {
return next.lookupCode(theValidationSupportContext, theSystem, theCode);
}
}
return null;

View File

@ -4,13 +4,11 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.validation.IInstanceValidatorModule;
import ca.uhn.fhir.validation.IValidationContext;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.convertors.VersionConvertor_10_50;
import org.hl7.fhir.convertors.VersionConvertor_14_50;
import org.hl7.fhir.convertors.VersionConvertor_30_50;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBaseResource;
@ -233,47 +231,17 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta
}
case DSTU2_1: {
converter = new VersionSpecificWorkerContextWrapper.IVersionTypeConverter() {
@Override
public org.hl7.fhir.r5.model.Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_14_50.convertResource((org.hl7.fhir.dstu2016may.model.Resource) theNonCanonical);
}
@Override
public IBaseResource fromCanonical(org.hl7.fhir.r5.model.Resource theCanonical) {
return VersionConvertor_14_50.convertResource(theCanonical);
}
};
converter = new VersionTypeConverterDstu21();
break;
}
case DSTU3: {
converter = new VersionSpecificWorkerContextWrapper.IVersionTypeConverter() {
@Override
public Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) theNonCanonical, true);
}
@Override
public IBaseResource fromCanonical(Resource theCanonical) {
return VersionConvertor_30_50.convertResource(theCanonical, true);
}
};
converter = new VersionTypeConverterDstu3();
break;
}
case R4: {
converter = new VersionSpecificWorkerContextWrapper.IVersionTypeConverter() {
@Override
public org.hl7.fhir.r5.model.Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_40_50.convertResource((org.hl7.fhir.r4.model.Resource) theNonCanonical);
}
@Override
public IBaseResource fromCanonical(org.hl7.fhir.r5.model.Resource theCanonical) {
return VersionConvertor_40_50.convertResource(theCanonical);
}
};
converter = new VersionTypeConverterR4();
break;
}
@ -286,7 +254,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta
throw new IllegalStateException();
}
wrappedWorkerContext = new VersionSpecificWorkerContextWrapper(myValidationSupport, converter);
wrappedWorkerContext = new VersionSpecificWorkerContextWrapper(new ValidationSupportContext(myValidationSupport), converter);
}
myWrappedWorkerContext = wrappedWorkerContext;

View File

@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException;
@ -32,6 +33,8 @@ import org.hl7.fhir.utilities.cache.NpmPackage;
import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.validation.ValidationMessage;
import org.hl7.fhir.utilities.validation.ValidationOptions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@ -47,17 +50,18 @@ import java.util.concurrent.TimeUnit;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerContext {
public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerContext {
public static final IVersionTypeConverter IDENTITY_VERSION_TYPE_CONVERTER = new VersionTypeConverterR5();
private static FhirContext ourR5Context = FhirContext.forR5();
private final IValidationSupport myValidationSupport;
private static final Logger ourLog = LoggerFactory.getLogger(VersionSpecificWorkerContextWrapper.class);
private static final FhirContext ourR5Context = FhirContext.forR5();
private final ValidationSupportContext myValidationSupportContext;
private final IVersionTypeConverter myModelConverter;
private volatile List<StructureDefinition> myAllStructures;
private LoadingCache<ResourceKey, IBaseResource> myFetchResourceCache;
private final LoadingCache<ResourceKey, IBaseResource> myFetchResourceCache;
private org.hl7.fhir.r5.model.Parameters myExpansionProfile;
public VersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport, IVersionTypeConverter theModelConverter) {
myValidationSupport = theValidationSupport;
public VersionSpecificWorkerContextWrapper(ValidationSupportContext theValidationSupportContext, IVersionTypeConverter theModelConverter) {
myValidationSupportContext = theValidationSupportContext;
myModelConverter = theModelConverter;
long timeoutMillis = 10 * DateUtils.MILLIS_PER_SECOND;
@ -71,13 +75,13 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
.build(key -> {
String fetchResourceName = key.getResourceName();
if (myValidationSupport.getFhirContext().getVersion().getVersion() == FhirVersionEnum.DSTU2) {
if (myValidationSupportContext.getRootValidationSupport().getFhirContext().getVersion().getVersion() == FhirVersionEnum.DSTU2) {
if ("CodeSystem".equals(fetchResourceName)) {
fetchResourceName = "ValueSet";
}
}
Class<? extends IBaseResource> fetchResourceType = myValidationSupport.getFhirContext().getResourceDefinition(fetchResourceName).getImplementingClass();
IBaseResource fetched = myValidationSupport.fetchResource(fetchResourceType, key.getUri());
Class<? extends IBaseResource> fetchResourceType = myValidationSupportContext.getRootValidationSupport().getFhirContext().getResourceDefinition(fetchResourceName).getImplementingClass();
IBaseResource fetched = myValidationSupportContext.getRootValidationSupport().fetchResource(fetchResourceType, key.getUri());
if (fetched == null) {
return null;
@ -87,8 +91,10 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
Resource canonical = myModelConverter.toCanonical(fetched);
if (canonical instanceof StructureDefinition) {
if (((StructureDefinition) canonical).getSnapshot().isEmpty()) {
fetched = myValidationSupport.generateSnapshot(myValidationSupport, fetched, "", null, "");
StructureDefinition canonicalSd = (StructureDefinition) canonical;
if (canonicalSd.getSnapshot().isEmpty()) {
ourLog.info("Generating snapshot for StructureDefinition: {}", canonicalSd.getUrl());
fetched = myValidationSupportContext.getRootValidationSupport().generateSnapshot(theValidationSupportContext, fetched, "", null, "");
Validate.isTrue(fetched != null, "StructureDefinition %s has no snapshot, and no snapshot generator is configured", key.getUri());
canonical = myModelConverter.toCanonical(fetched);
}
@ -116,7 +122,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
}
@Override
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FileNotFoundException, IOException, FHIRException {
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException {
}
@ -133,7 +139,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider profileKnowledgeProvider = new ProfileKnowledgeWorkerR5(ourR5Context);
ArrayList<ValidationMessage> messages = new ArrayList<>();
org.hl7.fhir.r5.model.StructureDefinition base = (org.hl7.fhir.r5.model.StructureDefinition) fetchResource(StructureDefinition.class, input.getBaseDefinition());
org.hl7.fhir.r5.model.StructureDefinition base = fetchResource(StructureDefinition.class, input.getBaseDefinition());
if (base == null) {
throw new PreconditionFailedException("Unknown base definition: " + input.getBaseDefinition());
}
@ -162,7 +168,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
List<StructureDefinition> retVal = myAllStructures;
if (retVal == null) {
retVal = new ArrayList<>();
for (IBaseResource next : myValidationSupport.fetchAllStructureDefinitions()) {
for (IBaseResource next : myValidationSupportContext.getRootValidationSupport().fetchAllStructureDefinitions()) {
try {
Resource converted = myModelConverter.toCanonical(next);
retVal.add((StructureDefinition) converted);
@ -229,7 +235,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
} catch (FHIRException e) {
throw new InternalErrorException(e);
}
IValidationSupport.ValueSetExpansionOutcome expanded = myValidationSupport.expandValueSet(myValidationSupport, null, convertedSource);
IValidationSupport.ValueSetExpansionOutcome expanded = myValidationSupportContext.getRootValidationSupport().expandValueSet(myValidationSupportContext, null, convertedSource);
org.hl7.fhir.r5.model.ValueSet convertedResult = null;
if (expanded.getValueSet() != null) {
@ -258,7 +264,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public Locale getLocale() {
return myValidationSupport.getFhirContext().getLocalizer().getLocale();
return myValidationSupportContext.getRootValidationSupport().getFhirContext().getLocalizer().getLocale();
}
@Override
@ -268,7 +274,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public org.hl7.fhir.r5.model.CodeSystem fetchCodeSystem(String system) {
IBaseResource fetched = myValidationSupport.fetchCodeSystem(system);
IBaseResource fetched = myValidationSupportContext.getRootValidationSupport().fetchCodeSystem(system);
if (fetched == null) {
return null;
}
@ -334,12 +340,12 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public List<String> getResourceNames() {
return new ArrayList<>(myValidationSupport.getFhirContext().getResourceTypes());
return new ArrayList<>(myValidationSupportContext.getRootValidationSupport().getFhirContext().getResourceTypes());
}
@Override
public Set<String> getResourceNamesAsSet() {
return myValidationSupport.getFhirContext().getResourceTypes();
return myValidationSupportContext.getRootValidationSupport().getFhirContext().getResourceTypes();
}
@Override
@ -390,7 +396,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public String getVersion() {
return myValidationSupport.getFhirContext().getVersion().getVersion().getFhirVersionString();
return myValidationSupportContext.getRootValidationSupport().getFhirContext().getVersion().getVersion().getFhirVersionString();
}
@Override
@ -445,7 +451,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public boolean supportsSystem(String system) {
return myValidationSupport.isCodeSystemSupported(myValidationSupport, system);
return myValidationSupportContext.getRootValidationSupport().isCodeSystemSupported(myValidationSupportContext, system);
}
@Override
@ -455,7 +461,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
@Override
public ValidationResult validateCode(ValidationOptions theOptions, String system, String code, String display) {
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(myValidationSupport, convertConceptValidationOptions(theOptions), system, code, display, null);
IValidationSupport.CodeValidationResult result = myValidationSupportContext.getRootValidationSupport().validateCode(myValidationSupportContext, convertConceptValidationOptions(theOptions), system, code, display, null);
return convertValidationResult(result);
}
@ -471,7 +477,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
throw new InternalErrorException(e);
}
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), theSystem, theCode, display, convertedVs);
IValidationSupport.CodeValidationResult result = myValidationSupportContext.getRootValidationSupport().validateCodeInValueSet(myValidationSupportContext, convertConceptValidationOptions(theOptions), theSystem, theCode, display, convertedVs);
return convertValidationResult(result);
}
@ -486,7 +492,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
throw new InternalErrorException(e);
}
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions).setInferSystem(true), null, code, null, convertedVs);
IValidationSupport.CodeValidationResult result = myValidationSupportContext.getRootValidationSupport().validateCodeInValueSet(myValidationSupportContext, convertConceptValidationOptions(theOptions).setInferSystem(true), null, code, null, convertedVs);
return convertValidationResult(result);
}
@ -502,7 +508,7 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
throw new InternalErrorException(e);
}
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCodeInValueSet(myValidationSupport, convertConceptValidationOptions(theOptions), code.getSystem(), code.getCode(), code.getDisplay(), convertedVs);
IValidationSupport.CodeValidationResult result = myValidationSupportContext.getRootValidationSupport().validateCodeInValueSet(myValidationSupportContext, convertConceptValidationOptions(theOptions), code.getSystem(), code.getCode(), code.getDisplay(), convertedVs);
return convertValidationResult(result);
}
@ -532,8 +538,8 @@ class VersionSpecificWorkerContextWrapper extends I18nBase implements IWorkerCon
private static class ResourceKey {
private final int myHashCode;
private String myResourceName;
private String myUri;
private final String myResourceName;
private final String myUri;
private ResourceKey(String theResourceName, String theUri) {
myResourceName = theResourceName;

View File

@ -0,0 +1,17 @@
package org.hl7.fhir.common.hapi.validation.validator;
import org.hl7.fhir.convertors.VersionConvertor_14_50;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.model.Resource;
public class VersionTypeConverterDstu21 implements VersionSpecificWorkerContextWrapper.IVersionTypeConverter {
@Override
public Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_14_50.convertResource((org.hl7.fhir.dstu2016may.model.Resource) theNonCanonical);
}
@Override
public IBaseResource fromCanonical(Resource theCanonical) {
return VersionConvertor_14_50.convertResource(theCanonical);
}
}

View File

@ -0,0 +1,17 @@
package org.hl7.fhir.common.hapi.validation.validator;
import org.hl7.fhir.convertors.VersionConvertor_30_50;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.model.Resource;
public class VersionTypeConverterDstu3 implements VersionSpecificWorkerContextWrapper.IVersionTypeConverter {
@Override
public Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_30_50.convertResource((org.hl7.fhir.dstu3.model.Resource) theNonCanonical, true);
}
@Override
public IBaseResource fromCanonical(Resource theCanonical) {
return VersionConvertor_30_50.convertResource(theCanonical, true);
}
}

View File

@ -0,0 +1,17 @@
package org.hl7.fhir.common.hapi.validation.validator;
import org.hl7.fhir.convertors.VersionConvertor_40_50;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r5.model.Resource;
public class VersionTypeConverterR4 implements VersionSpecificWorkerContextWrapper.IVersionTypeConverter {
@Override
public Resource toCanonical(IBaseResource theNonCanonical) {
return VersionConvertor_40_50.convertResource((org.hl7.fhir.r4.model.Resource) theNonCanonical);
}
@Override
public IBaseResource fromCanonical(Resource theCanonical) {
return VersionConvertor_40_50.convertResource(theCanonical);
}
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.common.hapi.validation.support;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import org.hl7.fhir.r4.model.ValueSet;
import org.junit.Before;
import org.junit.Test;
@ -23,19 +24,19 @@ public class CommonCodeSystemsTerminologyServiceTest {
@Test
public void testUcum_LookupCode_Good() {
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(myCtx.getValidationSupport(), "http://unitsofmeasure.org", "Cel");
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(new ValidationSupportContext(myCtx.getValidationSupport()), "http://unitsofmeasure.org", "Cel");
assertEquals(true, outcome.isFound());
}
@Test
public void testUcum_LookupCode_Bad() {
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(myCtx.getValidationSupport(), "http://unitsofmeasure.org", "AAAAA");
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(new ValidationSupportContext(myCtx.getValidationSupport()), "http://unitsofmeasure.org", "AAAAA");
assertNull( outcome);
}
@Test
public void testUcum_LookupCode_UnknownSystem() {
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(myCtx.getValidationSupport(), "http://foo", "AAAAA");
IValidationSupport.LookupCodeResult outcome = mySvc.lookupCode(new ValidationSupportContext(myCtx.getValidationSupport()), "http://foo", "AAAAA");
assertNull( outcome);
}
@ -43,7 +44,7 @@ public class CommonCodeSystemsTerminologyServiceTest {
public void testUcum_ValidateCode_Good() {
ValueSet vs = new ValueSet();
vs.setUrl("http://hl7.org/fhir/ValueSet/ucum-units");
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(myCtx.getValidationSupport(), new ConceptValidationOptions(), "http://unitsofmeasure.org", "mg", null, vs);
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(new ValidationSupportContext(myCtx.getValidationSupport()), new ConceptValidationOptions(), "http://unitsofmeasure.org", "mg", null, vs);
assertEquals(true, outcome.isOk());
assertEquals("(milligram)", outcome.getDisplay());
}
@ -52,7 +53,7 @@ public class CommonCodeSystemsTerminologyServiceTest {
public void testUcum_ValidateCode_Good_SystemInferred() {
ValueSet vs = new ValueSet();
vs.setUrl("http://hl7.org/fhir/ValueSet/ucum-units");
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(myCtx.getValidationSupport(), new ConceptValidationOptions().setInferSystem(true), null, "mg", null, vs);
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(new ValidationSupportContext(myCtx.getValidationSupport()), new ConceptValidationOptions().setInferSystem(true), null, "mg", null, vs);
assertEquals(true, outcome.isOk());
assertEquals("(milligram)", outcome.getDisplay());
}
@ -61,7 +62,7 @@ public class CommonCodeSystemsTerminologyServiceTest {
public void testUcum_ValidateCode_Bad() {
ValueSet vs = new ValueSet();
vs.setUrl("http://hl7.org/fhir/ValueSet/ucum-units");
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(myCtx.getValidationSupport(), new ConceptValidationOptions(), "http://unitsofmeasure.org", "aaaaa", null, vs);
IValidationSupport.CodeValidationResult outcome = mySvc.validateCodeInValueSet(new ValidationSupportContext(myCtx.getValidationSupport()), new ConceptValidationOptions(), "http://unitsofmeasure.org", "aaaaa", null, vs);
assertNull(outcome);
}

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.dstu3.hapi.validation;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.util.TestUtil;
import ca.uhn.fhir.validation.FhirValidator;
@ -14,6 +15,7 @@ import org.apache.commons.io.IOUtils;
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService;
import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.SnapshotGeneratingValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain;
import org.hl7.fhir.dstu3.hapi.ctx.HapiWorkerContext;
import org.hl7.fhir.dstu3.model.*;
@ -114,7 +116,8 @@ public class FhirInstanceValidatorDstu3Test {
mockSupport,
myDefaultValidationSupport,
new InMemoryTerminologyServerValidationSupport(ourCtx),
new CommonCodeSystemsTerminologyService(ourCtx)));
new CommonCodeSystemsTerminologyService(ourCtx),
new SnapshotGeneratingValidationSupport(ourCtx)));
myInstanceVal = new FhirInstanceValidator(myValidationSupport);
myVal.registerValidatorModule(myInstanceVal);
@ -129,7 +132,7 @@ public class FhirInstanceValidatorDstu3Test {
ValueSet arg = (ValueSet) theInvocation.getArgument(0, IBaseResource.class);
ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem());
if (retVal == null) {
ValueSet expandedVs = (ValueSet) myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg).getValueSet();
ValueSet expandedVs = (ValueSet) myDefaultValidationSupport.expandValueSet(new ValidationSupportContext(myDefaultValidationSupport), null, arg).getValueSet();
retVal = expandedVs.getExpansion();
}
ourLog.debug("expandValueSet({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal});
@ -199,7 +202,7 @@ public class FhirInstanceValidatorDstu3Test {
Optional<ConceptDefinitionComponent> found = cs.getConcept().stream().filter(t -> t.getCode().equals(code)).findFirst();
retVal = found.map(t -> new IValidationSupport.CodeValidationResult().setCode(t.getCode())).orElse(null);
} else {
retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl);
retVal = myDefaultValidationSupport.validateCode(new ValidationSupportContext(myDefaultValidationSupport), options, system, code, display, valueSetUrl);
}
ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal);
return retVal;
@ -230,12 +233,14 @@ public class FhirInstanceValidatorDstu3Test {
when(mockSupport.fetchStructureDefinition(nullable(String.class))).thenAnswer(new Answer<StructureDefinition>() {
@Override
public StructureDefinition answer(InvocationOnMock theInvocation) {
String url = (String) theInvocation.getArguments()[1];
String url = (String) theInvocation.getArgument(0, String.class);
StructureDefinition retVal = myStructureDefinitions.get(url);
if (retVal == null) {
retVal = (StructureDefinition) myDefaultValidationSupport.fetchStructureDefinition(url);
}
ourLog.info("fetchStructureDefinition({}) : {}", new Object[]{url, retVal});
if (retVal == null) {
ourLog.info("fetchStructureDefinition({}) : {}", new Object[]{url, retVal});
}
return retVal;
}
});
@ -243,7 +248,9 @@ public class FhirInstanceValidatorDstu3Test {
@Override
public List<StructureDefinition> answer(InvocationOnMock theInvocation) {
List<StructureDefinition> retVal = myDefaultValidationSupport.fetchAllStructureDefinitions();
ourLog.debug("fetchAllStructureDefinitions()", new Object[]{});
retVal = new ArrayList<>(retVal);
retVal.addAll(myStructureDefinitions.values());
ourLog.info("fetchAllStructureDefinitions()", new Object[]{});
return retVal;
}
});
@ -688,6 +695,53 @@ public class FhirInstanceValidatorDstu3Test {
assertTrue(output.isSuccessful());
}
@Test
public void testValidateUsingDifferentialProfile() throws IOException {
loadValueSet("/dstu3/nl/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000.json");
loadStructureDefinition("/dstu3/nl/nl-core-patient.json");
loadStructureDefinition("/dstu3/nl/proficiency.json");
loadStructureDefinition("/dstu3/nl/zibpatientlegalstatus.json");
loadStructureDefinition("/dstu3/nl/nl-core-contactpoint.json");
loadStructureDefinition("/dstu3/nl/Zibextensioncodespecification.json");
loadStructureDefinition("/dstu3/nl/nl-core-humanname.json");
loadStructureDefinition("/dstu3/nl/nl-core-preferred-pharmacy.json");
loadStructureDefinition("/dstu3/nl/nl-core-address.json");
loadStructureDefinition("/dstu3/nl/nl-core-address-official.json");
loadStructureDefinition("/dstu3/nl/Comment.json");
loadStructureDefinition("/dstu3/nl/nl-core-careplan.json");
loadStructureDefinition("/dstu3/nl/nl-core-healthcareservice.json");
loadStructureDefinition("/dstu3/nl/nl-core-organization.json");
loadStructureDefinition("/dstu3/nl/nl-core-practitionerrole.json");
loadStructureDefinition("/dstu3/nl/nl-core-careteam.json");
loadStructureDefinition("/dstu3/nl/nl-core-location.json");
loadStructureDefinition("/dstu3/nl/nl-core-person.json");
loadStructureDefinition("/dstu3/nl/nl-core-relatedperson.json");
loadStructureDefinition("/dstu3/nl/nl-core-episodeofcare.json");
loadStructureDefinition("/dstu3/nl/nl-core-observation.json");
loadStructureDefinition("/dstu3/nl/nl-core-practitioner.json");
loadStructureDefinition("/dstu3/nl/nl-core-relatedperson-role.json");
loadStructureDefinition("/dstu3/nl/PractitionerRoleReference.json");
Patient resource = loadResource("/dstu3/nl/nl-core-patient-01.json", Patient.class);
ValidationResult results = myVal.validateWithResult(resource);
List<SingleValidationMessage> outcome = logResultsAndReturnNonInformationalOnes(results);
assertThat(outcome.toString(), containsString("Element matches more than one slice"));
}
public void loadValueSet(String theFilename) throws IOException {
ValueSet vs = loadResource(theFilename, ValueSet.class);
myValueSets.put(vs.getUrl(), vs);
}
public void loadStructureDefinition(String theFilename) throws IOException {
StructureDefinition sd = loadResource(theFilename, StructureDefinition.class);
myStructureDefinitions.put(sd.getUrl(), sd);
}
/**
* See #739
*/

View File

@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.test.BaseTest;
@ -165,7 +166,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
ValueSet arg = (ValueSet) t.getArgument(2, IBaseResource.class);
ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem());
if (retVal == null) {
IBaseResource outcome = myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg).getValueSet();
IBaseResource outcome = myDefaultValidationSupport.expandValueSet(new ValidationSupportContext(myDefaultValidationSupport), null, arg).getValueSet();
return outcome;
}
ourLog.debug("expandValueSet({}) : {}", new Object[]{t.getArguments()[0], retVal});
@ -214,7 +215,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
} else if (myValidSystems.contains(system)) {
return new IValidationSupport.CodeValidationResult().setSeverityCode(ValidationMessage.IssueSeverity.WARNING.toCode()).setMessage("Unknown code: " + system + " / " + code);
} else {
retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl);
retVal = myDefaultValidationSupport.validateCode(new ValidationSupportContext(myDefaultValidationSupport), options, system, code, display, valueSetUrl);
}
ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal);
return retVal;

View File

@ -1,6 +1,7 @@
package org.hl7.fhir.r4.validation;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.api.EncodingEnum;
import org.apache.commons.io.IOUtils;
@ -36,11 +37,11 @@ public class SnapshotGeneratorR4Test {
ValidationSupportChain chain = new ValidationSupportChain(defaultSupport, snapshotGenerator);
// Generate the snapshot
StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(chain, differential, "http://foo", null, "THE BEST PROFILE");
StructureDefinition snapshot = (StructureDefinition) chain.generateSnapshot(new ValidationSupportContext(chain), differential, "http://foo", null, "THE BEST PROFILE");
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(snapshot));
assertEquals(51, snapshot.getSnapshot().getElement().size());
assertEquals(54, snapshot.getSnapshot().getElement().size());
}

View File

@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.context.support.ValueSetExpansionOptions;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.util.TestUtil;
@ -126,7 +127,7 @@ public class FhirInstanceValidatorR5Test {
ValueSet arg = (ValueSet) theInvocation.getArgument(2, IBaseResource.class);
ValueSetExpansionComponent retVal = mySupportedCodeSystemsForExpansion.get(arg.getCompose().getIncludeFirstRep().getSystem());
if (retVal == null) {
IValidationSupport.ValueSetExpansionOutcome outcome = myDefaultValidationSupport.expandValueSet(myDefaultValidationSupport, null, arg);
IValidationSupport.ValueSetExpansionOutcome outcome = myDefaultValidationSupport.expandValueSet(new ValidationSupportContext(myDefaultValidationSupport), null, arg);
return outcome;
}
ourLog.debug("expandValueSet({}) : {}", new Object[]{theInvocation.getArguments()[0], retVal});
@ -172,7 +173,7 @@ public class FhirInstanceValidatorR5Test {
} else if (myValidSystems.contains(system)) {
return new IValidationSupport.CodeValidationResult().setSeverity(IValidationSupport.IssueSeverity.WARNING).setMessage("Unknown code: " + system + " / " + code);
} else {
retVal = myDefaultValidationSupport.validateCode(myDefaultValidationSupport, options, system, code, display, valueSetUrl);
retVal = myDefaultValidationSupport.validateCode(new ValidationSupportContext(myDefaultValidationSupport), options, system, code, display, valueSetUrl);
}
ourLog.debug("validateCode({}, {}, {}, {}) : {}", system, code, display, valueSetUrl, retVal);
return retVal;

View File

@ -0,0 +1,55 @@
{
"resourceType": "ValueSet",
"id": "2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/shareablevalueset"
]
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod",
"valuePeriod": {
"start": "2017-12-31T00:00:00+02:00"
}
}
],
"url": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000",
"identifier": [
{
"use": "official",
"system": "http://art-decor.org/ns/oids/vs",
"value": "2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1"
}
],
"version": "2017-12-31T00:00:00",
"name": "LandGBACodelijst",
"title": "LandGBACodelijst",
"status": "active",
"experimental": false,
"publisher": "Registratie aan de bron",
"contact": [
{
"name": "Registratie aan de bron",
"telecom": [
{
"system": "url",
"value": "https://www.registratieaandebron.nl"
},
{
"system": "url",
"value": "https://zibs.nl"
}
]
}
],
"description": "GBA Tabel 34 (Landentabel) - Alle waarden",
"immutable": false,
"compose": {
"include": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.4.16.34"
}
]
}
}

View File

@ -0,0 +1,73 @@
{
"resourceType": "StructureDefinition",
"id": "Comment",
"url": "http://nictiz.nl/fhir/StructureDefinition/Comment",
"version": "1.0.1",
"name": "Comment",
"title": "Comment",
"status": "active",
"publisher": "Nictiz",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Many Dutch Health and Care Information models (Dutch: Zorginformatiebouwsteen or Zib) have a comment concept. This concept can not be mapped to all the Zib's respective FHIR resources. This extension provides a generic method to extend profiles with a comment element.",
"purpose": "Need to extend some FHIR resources with an additional unstructured comment value.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "complex-type",
"abstract": false,
"contextType": "resource",
"context": [
"*"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension",
"path": "Extension",
"short": "Comment",
"alias": [
"Toelichting"
]
},
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://nictiz.nl/fhir/StructureDefinition/Comment"
},
{
"id": "Extension.value[x]:valueString",
"path": "Extension.valueString",
"sliceName": "valueString",
"code": [
{
"system": "http://loinc.org",
"code": "48767-8",
"display": "Annotation comment [Interpretation] Narrative"
}
],
"short": "Comment",
"alias": [
"Toelichting"
],
"type": [
{
"code": "string"
}
]
}
]
}
}

View File

@ -0,0 +1,56 @@
{
"resourceType": "StructureDefinition",
"id": "practitionerrole-reference",
"url": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference",
"version": "0.2.0",
"name": "PractitionerRole Reference",
"title": "PractitionerRole Reference",
"status": "active",
"publisher": "Nictiz",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "This extension adds the PractitionerRole to the Reference datatype where FHIR STU3 Core does not yet specify it.",
"purpose": "PractitionerRole allows being specific about the specialism and organization of a Practitioner. This extension leads to slight duplication: a reference to a Practitioner provided in the PractitionerRole will also be given in the original Reference. If only the specialism and/or organization are available, the Reference.extension.valueReference.display will be duplicated into the original Reference.display. Systems that do not know about the extension would thus still have access to the regular Reference to Practitioner and to Reference.display. The PractitionerRole resource came into being shortly before releasing FHIR STU3 and only a few resources had been updated for it. As of FHIR R4 all relevant references for PractitionerRole are covered and this extension will no longer be required.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "complex-type",
"abstract": false,
"contextType": "datatype",
"context": [
"Reference"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
},
{
"id": "Extension.value[x]:valueReference",
"path": "Extension.valueReference",
"sliceName": "valueReference",
"comment": "PractitionerRole allows being specific about the specialism and organization of a Practitioner. This extension leads to slight duplication: a reference to a Practitioner provided in the PractitionerRole will also be given in the original Reference. If only the specialism and/or organization are available, the Reference.extension.valueReference.display will be duplicated into the original Reference.display. Systems that do not know about the extension would thus still have access to the regular Reference to Practitioner and to Reference.display.",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitionerrole"
}
]
}
]
}
}

View File

@ -0,0 +1,66 @@
{
"resourceType": "StructureDefinition",
"id": "code-specification",
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"version": "1.0.2",
"name": "Zib extension code specification",
"title": "HCIM extension code-specification",
"status": "active",
"publisher": "Nictiz",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Provides the specific HCIM code for a FHIR element that has a required binding to a FHIR ValueSet.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "complex-type",
"abstract": false,
"contextType": "datatype",
"context": [
"code",
"Coding",
"CodeableConcept",
"Address.country"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension",
"path": "Extension",
"short": "Provides the specific HCIM code for a FHIR element that has a required binding to a FHIR ValueSet",
"definition": "Defines a more specific coded value for a code or string. Especially useful for FHIR's required ValueSets. These extensions are primarily used on codes bound to a required value set, where you would like to use a more specific code than the codes in the bounded value set.",
"alias": [
"Bevat de specifieke code conform de zib, bij een FHIR-element die een verplichte koppeling heeft met een bepaalde FHIR waardelijst of een FHIR element die niet gecodeerd is gedefinieerd, terwijl de zib dit wel doet."
]
},
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
},
{
"id": "Extension.value[x]:valueCodeableConcept",
"path": "Extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"min": 1,
"type": [
{
"code": "CodeableConcept"
}
]
}
]
}
}

View File

@ -0,0 +1,66 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-address-official",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official",
"version": "2.0.0",
"name": "nl core address official",
"title": "nl-core-address-official",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Mark an address as an 'officially registered' address. In Dutch context that means it is registered in the Basisregistratie persoonsgegevens (BRP)",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "complex-type",
"abstract": false,
"contextType": "resource",
"context": [
"Address"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official"
},
{
"id": "Extension.value[x]:valueBoolean",
"path": "Extension.valueBoolean",
"sliceName": "valueBoolean",
"short": "true if part of an official registry. false if it is not",
"definition": "When the value is true, this address is marked to be part of an official registry (Dutch realm: BRP). When the value is false, this address is explicitly marked as not part of an official registry.",
"alias": [
"true als deze deel is van een officieel register. false indien dat niet het geval is"
],
"min": 1,
"type": [
{
"code": "boolean"
}
],
"meaningWhenMissing": "When an address is not marked explicitly as official=true|false then no information can be inferred from that.",
"mapping": [
{
"identity": "rim",
"map": "AD/@use[.='OR']"
}
]
}
]
}
}

View File

@ -0,0 +1,783 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-address",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-address",
"version": "2.0.3",
"name": "nl-core-address",
"title": "nl-core-address",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Base StructureDefinition for Address Type with additions for Dutch realm addresses. Dutch addresses break down Address.line in several parts and it is important to mark an address as being 'officially registered'.",
"purpose": "Address information is used for visiting a person or organization and for addressing of mail.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "AddressInformation as part of HCIM Patient-v2.0.1(2015EN)",
"comment": "AddressInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "AddressInformation as part of HCIM Patient-v3.0(2016EN)",
"comment": "AddressInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/AddressInformation-v1.0(2017EN)",
"name": "HCIM AddressInformation-v1.0.1(2017EN)"
},
{
"identity": "BRP",
"uri": "https://nl.wikipedia.org/wiki/Basisregistratie_Personen",
"name": "Basisregistratie Personen",
"comment": "Voorheen GBA - Gemeentelijke basisregistratie"
}
],
"kind": "complex-type",
"abstract": false,
"type": "Address",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Address",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Address",
"path": "Address",
"short": "Address information",
"definition": "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 and adds all relevant components to express Dutch addresses.\r\n\r\nA Dutch Address is a proper FHIR Address. Systems that do not understand any of the extensions, will be able to render and work with a Dutch address. Dutch addresses make certain address parts separately communicable. These parts are required for use in true Dutch systems when dealing with Dutch addresses, but may not have value for international systems when information gets sent abroad.\r\n\r\nTo have true compatibility an implementer SHOULD use the core Address parts as intended. To have addresses work for Dutch context, the implementer SHOULD in addition use the extension elements.\r\n\r\nThe HCIM defines certain address types in the AdresSoortCodelijst. These do not all have a one to one mapping in the FHIR Address datatype. The following explains how to deal with that. In addition, there are the ConceptMaps http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressUse and http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressType to define this relationship\r\n\r\nHCIM Postal Address maps to Address.type 'postal'; \r\n\r\nHCIM Primary Home Address maps to Address.extension:official 'true' + Address.use 'home' + Address.use.extension 'HP'; \r\n\r\nHCIM Visit Address (Woon-/verblijfadres) maps to Address.use 'home' + Address.type 'physical' + Address.use.extension 'PHYS'; \r\n\r\nHCIM Temporary Address maps to Address.use 'temp'; \r\n\r\nHCIM Work Place Address maps to Address.use 'work'; \r\n\r\nHCIM Vacation Home Address maps to Address.use 'temp' + Address.use.extension 'HV'.\r\n\r\nIf Address.type is \"both\" then this is to be understood as a dual purpose address (postal and physical). Systems that support importing it like this are encouraged to do so, otherwise they may need to import this as two separate addresses.",
"alias": [
"AdresInformatie"
],
"example": [
{
"label": "Example of a vacation home address",
"valueAddress": {
"extension": [
{
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official",
"valueBoolean": false
}
],
"use": "temp",
"_use": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-AD-use",
"valueCode": "HV"
}
]
},
"line": [
"Binnenkant 12A Hoog"
],
"_line": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName",
"valueString": "Binnenkant"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber",
"valueString": "12"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix",
"valueString": "A"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID",
"valueString": "Hoog"
}
]
}
],
"city": "Amsterdam",
"state": "NH",
"postalCode": "1000AA",
"country": "NLD"
}
},
{
"label": "Example of a primary home address",
"valueAddress": {
"extension": [
{
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official",
"valueBoolean": true
}
],
"use": "home",
"line": [
"Binnenkant to 10"
],
"_line": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName",
"valueString": "Binnenkant"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator",
"valueString": "to"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber",
"valueString": "10"
}
]
}
],
"city": "Amsterdam",
"state": "NH",
"postalCode": "1001AA",
"country": "NLD"
}
}
],
"condition": [
"nl-streetname-if-official-and-other-line-parts"
],
"constraint": [
{
"key": "nl-streetname-if-official-and-other-line-parts",
"requirements": "This constraint checks conformance against the Dutch BRP constraints on address parts. However: when you only send postalCode + houseNumber which is enough for certain cases this may still be a valid address",
"severity": "error",
"human": "Address.streetName in an official address SHALL have a value if one of houseNumber|buildingNumberSuffix|additionalLocator has a value",
"expression": "(extension.where(url = 'http://fhir.nl/fhir/StructureDefinition/nl-core-address-official').where(value = true)).empty() or (line.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName').empty().not() and (line.extension.where(url='http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber').empty().not() or line.extension.where(url='http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix').empty().not() or line.extension.where(url='http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator').empty().not()))",
"xpath": "not(.[f:extension[@url='http://fhir.nl/fhir/StructureDefinition/nl-core-address-official'][f:valueBoolean/@value='true']][f:line[empty(f:extension[@url='http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName'])][f:extension[@url=('http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber','http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix','http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator')]]])"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.1",
"comment": "AddressInformation"
}
]
},
{
"id": "Address.extension",
"path": "Address.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "Address.extension:official",
"path": "Address.extension",
"sliceName": "official",
"short": "Mark an address as an 'officially registered' address.",
"definition": "Mark an address as an 'officially registered' address. In Dutch context that means it is registered in the Basisregistratie persoonsgegevens (BRP)",
"alias": [
"Markeer een adres als een 'officieel geregistreerd adres."
],
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.8",
"comment": "AddressType"
}
]
},
{
"id": "Address.use",
"path": "Address.use",
"definition": "Purpose of this address",
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressUse"
},
{
"identity": "hcim-address-v3.0-2016EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressUse"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.8",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressUse"
}
]
},
{
"id": "Address.use.extension",
"path": "Address.use.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "Address.use.extension:AD_use",
"path": "Address.use.extension",
"sliceName": "AD_use",
"short": "Further define the address use with the exact HCIM code.",
"definition": "Further define the address use with the exact HCIM code. Mostly relevant to distinguish between different types of temporary addresses. TMP and WP are not included in the valueset address-use but can be included through this extension",
"alias": [
"Precieze definiëring van adressoort op basis van exacte zib-code"
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-AD-use"
}
]
},
{
"id": "Address.use.extension:AD_use.valueCode:valueCode",
"path": "Address.use.extension.valueCode",
"sliceName": "valueCode"
},
{
"id": "Address.type",
"path": "Address.type",
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressType"
},
{
"identity": "hcim-address-v3.0-2016EN",
"map": "NL-CM:0.1.11",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressType"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.8",
"comment": "AddressType. See for details the ConceptMap http://nictiz.nl/fhir/ConceptMap/AdresSoortCodelijst-to-AddressType"
}
]
},
{
"id": "Address.line.extension",
"path": "Address.line.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "Address.line.extension:streetName",
"path": "Address.line.extension",
"sliceName": "streetName",
"definition": "Street name. If the address is a P.O. Box then the Dutch word \"Postbus\" shall be communicated. If the address is an answer number (mailing address where the receiver pays postage) then the Dutch word \"Antwoordnummer\" shall be communicated.",
"requirements": "Basisregistratie Persoonsgegevens 11.10 Straatnaam",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.12",
"comment": "Street"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.12",
"comment": "Street"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.2",
"comment": "Street"
},
{
"identity": "BRP",
"map": "11.10",
"comment": "Straatnaam"
}
]
},
{
"id": "Address.line.extension:streetName.valueString:valueString",
"path": "Address.line.extension.valueString",
"sliceName": "valueString"
},
{
"id": "Address.line.extension:houseNumber",
"path": "Address.line.extension",
"sliceName": "houseNumber",
"definition": "The element houseNumber shall contain the house number. The house number may contains non-numeric parts that further determine the address, e.g. \"23a\", but only if the source system cannot discretely communicate those. House letter shall, if possible, be communicated through the element buildingNumberSuffix. Information such as \"to\" (house boats that do not have their own house number, but are across (tegenover) a house with a house number or \"3 hoog achter\" are not part of this attribute. This type of information is conveyed elsewhere in the Address datatype.",
"requirements": "Basisregistratie Persoonsgegevens 11.20 Huisnummer",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.13",
"comment": "HouseNumber"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.13",
"comment": "HouseNumber"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.12",
"comment": "HouseNumber"
},
{
"identity": "BRP",
"map": "11.20",
"comment": "Huisnummer"
}
]
},
{
"id": "Address.line.extension:houseNumber.valueString:valueString",
"path": "Address.line.extension.valueString",
"sliceName": "valueString"
},
{
"id": "Address.line.extension:buildingNumbersuffix",
"path": "Address.line.extension",
"sliceName": "buildingNumbersuffix",
"definition": "HouseNumberLetter\r\n- A letter following the house number as assigned by the municipal authorities.\r\n\r\nHouseNumberAddition\r\n- The letters or signs needed to locate the mailbox, in addition to the house number and letter.",
"comment": "Export\r\n\r\n- If a house letter as well as a house number addition is known: house letter first, followed by a space and finally the house letter suffix.\r\n- If only a house letter is known send just that. No trailing space is required.\r\n- If only a house letter suffix is known, communicate that with a leading space.\r\n\r\nImport\r\n\r\n- If the value of buildingNumberSuffix contains no space, then the whole value is considered to be the house letter\r\n- If the value of buildingNumberSuffix contains a space, then everything before the first space is considered to be the house letter, and the everything trailing the first space is considered to be the house number suffix",
"requirements": "Basisregistratie Persoonsgegevens 11.30 Huisletter\r\n11.40 Huisnummertoevoeging\r\n12.10 Locatieomschrijving",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.40",
"comment": "HouseNumberLetter"
},
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.41",
"comment": "HouseNumberAddition"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.40",
"comment": "HouseNumberLetter"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.41",
"comment": "HouseNumberAddition"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.11",
"comment": "HouseNumberLetter"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.10",
"comment": "HouseNumberAddition"
},
{
"identity": "BRP",
"map": "11.30",
"comment": "Huisletter"
},
{
"identity": "BRP",
"map": "11.40",
"comment": "Huisnummertoevoeging"
}
]
},
{
"id": "Address.line.extension:buildingNumbersuffix.valueString:valueString",
"path": "Address.line.extension.valueString",
"sliceName": "valueString"
},
{
"id": "Address.line.extension:unitID",
"path": "Address.line.extension",
"sliceName": "unitID",
"definition": "Extra information such as the building name, building number, entrance, route number.",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.28",
"comment": "AdditionalInformation"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.28",
"comment": "AdditionalInformation"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.7",
"comment": "AdditionalInformation"
}
]
},
{
"id": "Address.line.extension:unitID.valueString:valueString",
"path": "Address.line.extension.valueString",
"sliceName": "valueString"
},
{
"id": "Address.line.extension:additionalLocator",
"path": "Address.line.extension",
"sliceName": "additionalLocator",
"definition": "HouseNumberIndication - The indication used for addresses that do not consist of the usual street name and house number.",
"requirements": "Basisregistratie Persoonsgegevens 11.50 Aanduiding bij huisnummer",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.42",
"comment": "HouseNumberIndication"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.42",
"comment": "HouseNumberIndication"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.9",
"comment": "HouseNumberIndication"
},
{
"identity": "BRP",
"map": "11.50",
"comment": "Aanduiding bij huisnummer"
}
]
},
{
"id": "Address.line.extension:additionalLocator.valueString:valueString",
"path": "Address.line.extension.valueString",
"sliceName": "valueString"
},
{
"id": "Address.city",
"path": "Address.city",
"requirements": "Basisregistratie Persoonsgegevens 11.70 Woonplaatsnaam",
"alias": [
"Municipality",
"woonplaats"
],
"example": [
{
"label": "Example city",
"valueString": "Den Haag"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.14",
"comment": "Place of residence"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.14",
"comment": "Place of residence"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.3",
"comment": "PlaceOfResidence"
},
{
"identity": "BRP",
"map": "11.70",
"comment": "Woonplaatsnaam"
}
]
},
{
"id": "Address.district",
"path": "Address.district",
"comment": "District is sometimes known as county, but in some regions 'county' is used in place of city (municipality), so county name should be conveyed in city instead. In a Dutch address this element is used for the population of a \"gemeente\"",
"requirements": "Basisregistratie Persoonsgegevens 09.10 Gemeente van inschrijving",
"alias": [
"Gemeente"
],
"example": [
{
"label": "Example district",
"valueString": "Wateringen"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.16",
"comment": "Municipality"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.16",
"comment": "Municipality"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.4",
"comment": "Municipality"
},
{
"identity": "BRP",
"map": "09.10",
"comment": "Gemeente van inschrijving"
}
]
},
{
"id": "Address.state",
"path": "Address.state",
"short": "Sub-unit of country (abbreviations ok).",
"definition": "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). For Dutch addresses this element should contain the \"provincie\" code",
"requirements": "Some (Dutch) cities have the same name in multiple provinces. Dutch examples include Bergen (Noord-Holland / Limburg) and Geesteren (Gelderland / Overijssel).",
"alias": [
"Provincie"
],
"example": [
{
"label": "Example province",
"valueString": "ZH"
}
]
},
{
"id": "Address.postalCode",
"path": "Address.postalCode",
"comment": "Dutch postal codes have pattern '\\d{4}[A-Z]{2}' so they do not have spaces. Systems can easily render postal codes with a space if necessary.",
"alias": [
"Postcode"
],
"example": [
{
"label": "Example postcode",
"valueString": "9132AG"
}
],
"condition": [
"nl-postal-code-pattern"
],
"constraint": [
{
"key": "nl-postal-code-pattern",
"severity": "error",
"human": "Dutch postal code pattern 'nnnnAA'",
"expression": "(country in 'nl' | 'nld' | 'nederland').not() or matches('^\\\\d{4}[A-Z]{2}$')",
"xpath": "not(../f:country[lower-case(@value)=('nl','nld','nederland')]) or matches(@value,'^\\d{4}[A-Z]{2}$')"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.15",
"comment": "Postcode"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.15",
"comment": "Postcode"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.6",
"comment": "Postcode"
},
{
"identity": "BRP",
"map": "11.60",
"comment": "Postcode"
}
]
},
{
"id": "Address.country",
"path": "Address.country",
"short": "Country (can be ISO 3166 3 letter code)",
"definition": "A country (code) for the address.",
"comment": "The FHIR datatype does not properly support coding the country using a CodeableConcept or Coding datatype. If the sender supports coded countries, it SHALL send the coded value using the code-specification extension under Address.country.",
"alias": [
"land"
],
"example": [
{
"label": "Example country",
"valueString": "NLD"
}
],
"mapping": [
{
"identity": "hcim-address-v2.0.1-2015EN",
"map": "NL-CM:0.1.17",
"comment": "Country"
},
{
"identity": "hcim-addressinformation-v3.0-2016EN",
"map": "NL-CM:0.1.17",
"comment": "Country"
},
{
"identity": "hcim-addressinformation-v1.0-2017EN",
"map": "NL-CM:20.5.5",
"comment": "Country"
}
]
},
{
"id": "Address.country.extension",
"path": "Address.country.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
},
{
"type": "value",
"path": "value.coding.system"
}
],
"rules": "open"
}
},
{
"id": "Address.country.extension:LandGBACodelijst",
"path": "Address.country.extension",
"sliceName": "LandGBACodelijst",
"short": "LandGBACode",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "Address.country.extension:LandGBACodelijst.valueCodeableConcept:valueCodeableConcept",
"path": "Address.country.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "LandGBACodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000",
"display": "LandGBACodelijst"
}
}
},
{
"id": "Address.country.extension:LandISOCodelijst",
"path": "Address.country.extension",
"sliceName": "LandISOCodelijst",
"short": "LandISOCode",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "Address.country.extension:LandISOCodelijst.valueCodeableConcept:valueCodeableConcept",
"path": "Address.country.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "LandISOCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.2--20171231000000",
"display": "LandISOCodelijst"
}
}
}
]
}
}

View File

@ -0,0 +1,736 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-careplan",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-careplan",
"version": "1.0.0",
"name": "nl-core-careplan",
"title": "nl-core-careplan",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A nl-core base CarePlan profile, that references to all relating Dutch Health and Care Information models or HCIM (Dutch: Zorginformatiebouwsteen or ZIB) profiles. This profile is not based on a HCIM, beceause no HCIM exists for a CarePlan concept.",
"purpose": "Multiple HCIM are better interperted in a coherent set then by them selfs. These are the HCIMs NursingIntervention, TreatmentObjective, and TreatmentOutcome. They consistute a CarePlan, hence the reason to create a CarePlan profile.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"uri": "https://zibs.nl/wiki/NursingIntervention-v3.2(2018EN)",
"name": "HCIM NursingIntervention-v3.2(2018EN)",
"comment": "HCIM release 2018 is because it does not have the redundant container 'NursingProcedure'."
},
{
"identity": "hcim-outcomeofcare-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/OutcomeOfCare-v3.1(2017EN)",
"name": "HCIM OutcomeOfCare-v3.1 (2017EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "CarePlan",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "CarePlan.identifier",
"path": "CarePlan.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "CarePlan.subject",
"path": "CarePlan.subject",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.11",
"comment": "Subject"
}
]
},
{
"id": "CarePlan.context",
"path": "CarePlan.context",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Encounter"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-episodeofcare"
}
]
},
{
"id": "CarePlan.period",
"path": "CarePlan.period",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.14",
"comment": "DateTime"
}
]
},
{
"id": "CarePlan.author",
"path": "CarePlan.author",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-careteam"
}
]
},
{
"id": "CarePlan.author.extension",
"path": "CarePlan.author.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.author.extension:practitionerRole",
"path": "CarePlan.author.extension",
"sliceName": "practitionerRole",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
}
]
},
{
"id": "CarePlan.goal",
"path": "CarePlan.goal",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentObjective"
}
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.14",
"comment": "TreatmentObjective"
}
]
},
{
"id": "CarePlan.activity",
"path": "CarePlan.activity",
"slicing": {
"discriminator": [
{
"type": "pattern",
"path": "detail.category"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.activity:nursingIntervention",
"path": "CarePlan.activity",
"sliceName": "nursingIntervention",
"constraint": [
{
"key": "hicm-outcomeofcare-1",
"severity": "error",
"human": "Provide a HealthcareResult text or a reference, not both",
"expression": "outcomeCodeableConcept.empty() or outcomeReference.empty()"
}
],
"mapping": [
{
"identity": "hcim-outcomeofcare-v3.2-2018EN",
"map": "NL-CM:13.4.4",
"comment": "Intervention"
},
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.1",
"comment": "NursingIntervention"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.extension",
"path": "CarePlan.activity.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.activity:nursingIntervention.extension:comment",
"path": "CarePlan.activity.extension",
"sliceName": "comment",
"definition": "Comment on the nursing intervention.",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/Comment"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.extension:comment.valueString:valueString",
"path": "CarePlan.activity.extension.valueString",
"sliceName": "valueString",
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.5"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.outcomeCodeableConcept",
"path": "CarePlan.activity.outcomeCodeableConcept",
"max": "1"
},
{
"id": "CarePlan.activity:nursingIntervention.outcomeCodeableConcept.text",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
"valueBoolean": true
}
],
"path": "CarePlan.activity.outcomeCodeableConcept.text",
"short": "HealthcareResult",
"definition": "The textual account of the healthcare result. If HealthcareResult cannot be entered as a measurement value or functional/mental status, it can be described as free text in the healthcare result.",
"alias": [
"Zorgresultaat"
],
"mapping": [
{
"identity": "hcim-outcomeofcare-v3.1-2017EN",
"map": "NL-CM:13.4.5",
"comment": "HealthcareResult"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.outcomeReference",
"path": "CarePlan.activity.outcomeReference",
"short": "MeasurementValue / HealthCondition",
"definition": "Measurements in which an observation, carried out with a (measuring) tool if possible, is translated to a relevant unit or a description of the patients health condition in the form of a functional and/or mental status.",
"alias": [
"Meetwaarde",
"Gezondheidstoestand"
],
"max": "1",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-GeneralMeasurement"
},
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-FunctionalOrMentalStatus"
}
],
"mapping": [
{
"identity": "hcim-outcomeofcare-v3.1-2017EN",
"map": "NL-CM:13.4.2",
"comment": "MeasurementValue"
},
{
"identity": "hcim-outcomeofcare-v3.1-2017EN",
"map": "NL-CM:13.4.3",
"comment": "HealthCondition"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.reference",
"path": "CarePlan.activity.reference",
"definition": "The details of the proposed activity represented in a specific resource.\r\nUsed for example to provide the details of the health professional who requested the nursing intervention. If desired, only the requesters specialty can be entered.",
"comment": "Requester information should be captured and exchanged in the resource ProcedureRequest referenced by activity.referenc. Requester is the healthcare provider and/or organization where or by whom the NursingInterverntion was requested. There are a few required elements in ProcedureRequest\r\n - ProcedureRequest.status (use fixed value \"active\", unless you know what the actual value is)\r\n - ProcedureRequest.intent (use fixed value \"order\", unless you know what the actual value is)\r\n - ProcedureRequest.code (use extension http://hl7.org/fhir/STU3/extension-iso21090-nullflavor.html met valueCode UNK, unless you know what the actual value is)\r\n - ProcedureRequest.subject (equal to Observation.subject)\r\n - ProcedureRequest.requester.agent (contains the requesting HealthProfessional)",
"type": [
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Appointment"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/CommunicationRequest"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Task"
},
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-ProcedureRequest"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/VisionPrescription"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/RequestGroup"
}
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.8",
"comment": "Requester"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.extension",
"path": "CarePlan.activity.detail.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.extension:medicalDevice",
"path": "CarePlan.activity.detail.extension",
"sliceName": "medicalDevice",
"short": "MedicalDevice",
"definition": "Description of the materials used for the nursing procedure, such as bandages.",
"alias": [
"MedischHulpmiddel"
],
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/extension-medicaldevice"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.extension:medicalDevice.valueReference:valueReference",
"path": "CarePlan.activity.detail.extension.valueReference",
"sliceName": "valueReference",
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.13",
"comment": "MedicalDevice"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.category",
"path": "CarePlan.activity.detail.category",
"short": "Nursing procedure",
"definition": "High-level categorization of the type of activity in a care plan. This slice defines a nursing procedure conform the HCIM NursingIntervention.",
"min": 1,
"patternCodeableConcept": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "9632001"
}
]
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code",
"path": "CarePlan.activity.detail.code",
"short": "Intervention",
"definition": "A nursing intervention is a treatment carried out by a nurse based on an expert opinion and clinical knowledge for the benefit of the person requesting healthcare. The intervention is targeted towards a certain problem (diagnosis) and has a predetermined healthcare result.",
"alias": [
"Interventie"
],
"min": 1,
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.2",
"comment": "Intervention"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding",
"path": "CarePlan.activity.detail.code.coding",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionNICCodelist",
"path": "CarePlan.activity.detail.code.coding",
"sliceName": "interventionNICCodelist",
"short": "interventionNICCodelist",
"max": "1",
"binding": {
"strength": "extensible",
"description": "NIC - All Values",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.14.2.2--20171231000000"
}
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionNICCodelist.system",
"path": "CarePlan.activity.detail.code.coding.system",
"min": 1
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionNICCodelist.code",
"path": "CarePlan.activity.detail.code.coding.code",
"min": 1
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionSnomedCodelist",
"path": "CarePlan.activity.detail.code.coding",
"sliceName": "interventionSnomedCodelist",
"short": "interventionSnomedCodelist",
"max": "1",
"binding": {
"strength": "extensible",
"description": "SNOMED CT - SNOMED CT: &lt;&lt;71388002 | procedure |",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.14.2.4--20171231000000"
}
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionSnomedCodelist.system",
"path": "CarePlan.activity.detail.code.coding.system",
"min": 1
},
{
"id": "CarePlan.activity:nursingIntervention.detail.code.coding:interventionSnomedCodelist.code",
"path": "CarePlan.activity.detail.code.coding.code",
"min": 1
},
{
"id": "CarePlan.activity:nursingIntervention.detail.reasonReference",
"path": "CarePlan.activity.detail.reasonReference",
"short": "Indication",
"definition": "The nursing-related problem (indication) providing cause for the intervention.",
"alias": [
"Indicatie"
],
"max": "1",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Problem"
}
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.6",
"comment": "Indication"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.goal",
"path": "CarePlan.activity.detail.goal",
"short": "TreatmentObjective",
"definition": "The description of the treatment goal that the intervention decision is based on.",
"alias": [
"Behandeldoel"
],
"max": "1",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentObjective"
}
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.14",
"comment": "TreatmentObjective"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming",
"path": "CarePlan.activity.detail.scheduledTiming",
"sliceName": "scheduledTiming",
"type": [
{
"code": "Timing"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming.repeat.bounds[x]:boundsPeriod",
"path": "CarePlan.activity.detail.scheduledTiming.repeat.boundsPeriod",
"sliceName": "boundsPeriod",
"type": [
{
"code": "Period"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming.repeat.bounds[x]:boundsPeriod.start",
"path": "CarePlan.activity.detail.scheduledTiming.repeat.boundsPeriod.start",
"short": "ProcedureStartDateTime",
"definition": "The start date (and if possible start time) of the procedure. The concept offers the option to indicate the start of the period of a series of repeating procedures.",
"alias": [
"ActieStartDatumTijd"
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.11",
"comment": "ProcedureStartDateTime"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming.repeat.bounds[x]:boundsPeriod.end",
"path": "CarePlan.activity.detail.scheduledTiming.repeat.boundsPeriod.end",
"short": "ProcedureEndDateTime",
"definition": "The end date (and if possible end time) of the procedure. The concept offers the option to indicate the end of the period of a series of repeating procedures.",
"alias": [
"ActieEindDatumTijd"
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.12",
"comment": "ProcedureEndDateTime"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming.repeat.frequency",
"path": "CarePlan.activity.detail.scheduledTiming.repeat.frequency",
"short": "Frequency",
"definition": "The frequency describes how often and in which period certain procedures are carried out, e.g. 3x a day.",
"alias": [
"Frequentie"
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.4",
"comment": "Frequency"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.scheduled[x]:scheduledTiming.repeat.period",
"path": "CarePlan.activity.detail.scheduledTiming.repeat.period",
"short": "Interval",
"definition": "\"Interval indicates the time between planned procedures.\nWhen entering an interval, the focus is on the time between the consecutive procedures, such as in the treatment of a wound, for example. The exact times are of lesser importance.\"",
"alias": [
"Interval"
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.3",
"comment": "Interval"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.location",
"path": "CarePlan.activity.detail.location",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-location"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.performer",
"path": "CarePlan.activity.detail.performer",
"short": "Performer",
"definition": "The person carrying out the nursing procedure. Can be the health professional, caregiver or the patient.",
"alias": [
"Uitvoerder",
"Zorgverlener",
"Verzorger",
"Patient"
],
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-careteam"
}
],
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.15",
"comment": "Performer"
},
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.7",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.16",
"comment": "Caregiver"
},
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.17",
"comment": "Patient"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.performer.extension",
"path": "CarePlan.activity.detail.performer.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "CarePlan.activity:nursingIntervention.detail.performer.extension:practitionerRole",
"path": "CarePlan.activity.detail.performer.extension",
"sliceName": "practitionerRole",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
}
]
},
{
"id": "CarePlan.activity:nursingIntervention.detail.description",
"path": "CarePlan.activity.detail.description",
"short": "Instruction",
"definition": "Instructions for performing the nursing action. This is particularly at issue when the action is performed by the patient himself or by a caregiver.",
"mapping": [
{
"identity": "hcim-nursingintervention-v3.2-2018EN",
"map": "NL-CM:14.2.18",
"comment": "Instruction"
}
]
}
]
}
}

View File

@ -0,0 +1,242 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-careteam",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-careteam",
"version": "2.0.1",
"name": "nl-core-careteam",
"title": "nl-core-careteam",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A nl-core base CareTeam profile, that references to all relating Dutch Health and Care Information models or HCIM (Dutch: Zorginformatiebouwsteen or ZIB) profiles. This profile is not based on a ZIB, beceause no ZIB exists for the CareTeam concept.",
"purpose": "The MedMij GGZ use case has a direct need voor exchanging careteam information with the patient.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v1.2.1(2015EN)",
"name": "HCIM HealthProfessional-v1.2.1(2015EN)"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.0(2016EN)",
"name": "HCIM HealthProfessional-v3.0(2016EN)"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.2(2017EN)",
"name": "HCIM HealthProfessional-v3.2(2017EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "CareTeam",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/CareTeam",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "CareTeam.identifier",
"path": "CareTeam.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "CareTeam.subject",
"path": "CareTeam.subject",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.11",
"comment": "Subject"
}
]
},
{
"id": "CareTeam.context",
"path": "CareTeam.context",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Encounter"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-episodeofcare"
}
]
},
{
"id": "CareTeam.period",
"path": "CareTeam.period",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.14",
"comment": "DateTime"
}
]
},
{
"id": "CareTeam.participant.role.coding",
"path": "CareTeam.participant.role.coding",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
}
},
{
"id": "CareTeam.participant.role.coding:healthProfessionalRole",
"path": "CareTeam.participant.role.coding",
"sliceName": "healthProfessionalRole",
"short": "HealthProfessionalRole",
"definition": "The role the healthcare provider fulfils in the healthcare process. For healthcare providers, this could be for example main practitioner, referrer or general practitioner.",
"alias": [
"ZorgverlenerRol"
],
"binding": {
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.1.5--20171231000000",
"display": "ZorgverlenerRolCodelijst"
}
},
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.5",
"comment": "HealthcareProviderRole"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.5",
"comment": "HealthcareProviderRole"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.5",
"comment": "HealthProfessionalRole"
}
]
},
{
"id": "CareTeam.participant.member",
"path": "CareTeam.participant.member",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/CareTeam"
}
]
},
{
"id": "CareTeam.participant.member.extension",
"path": "CareTeam.participant.member.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "CareTeam.participant.member.extension:practitionerRole",
"path": "CareTeam.participant.member.extension",
"sliceName": "practitionerRole",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
}
]
},
{
"id": "CareTeam.participant.onBehalfOf",
"path": "CareTeam.participant.onBehalfOf",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
},
{
"id": "CareTeam.reasonReference",
"path": "CareTeam.reasonReference",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Problem"
}
]
},
{
"id": "CareTeam.managingOrganization",
"path": "CareTeam.managingOrganization",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
}
]
}
}

View File

@ -0,0 +1,916 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-contactpoint",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint",
"version": "1.0.2",
"name": "nl-core-contactpoint",
"title": "nl-core-contactpoint",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Base StructureDefinition for Address Type with additions for Dutch realm addresses. Dutch addresses break down Address.line in several parts and it is important to mark an address as being 'officially registered'.",
"purpose": "Address information is used for visiting a person or organization and for addressing of mail.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "ContactInformation as part of HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "ContactInformation as part of HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0.1(2017EN)"
}
],
"kind": "complex-type",
"abstract": false,
"type": "ContactPoint",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/ContactPoint",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "ContactPoint",
"path": "ContactPoint",
"short": "ContactInformation",
"definition": "Contact information includes a person's telephone numbers en e-mail addresses.",
"alias": [
"Contactgegevens"
],
"example": [
{
"label": "Mobile business phone number. Note: the mobile nature stems from the number being an 06-* number.",
"valueContactPoint": {
"system": "phone",
"value": "+31611234567",
"use": "work"
}
},
{
"label": "Mobile phone number undetermined private/business. Note: the mobile nature stems from the number being an 06-* number.",
"valueContactPoint": {
"system": "phone",
"value": "+31611234567",
"use": "mobile"
}
},
{
"label": "Primary Home Land Line",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "LL",
"display": "Land Line"
}
]
}
}
]
},
"value": "...",
"use": "home",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "HP",
"display": "Primary Home"
}
]
}
}
]
}
}
},
{
"label": "Temporary Land Line",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "LL",
"display": "Land Line"
}
]
}
}
]
},
"value": "...",
"use": "temp",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "TMP",
"display": "Temporary"
}
]
}
}
]
}
}
},
{
"label": "Primary Work Land Line",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "LL",
"display": "Land Line"
}
]
}
}
]
},
"value": "...",
"use": "work",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "WP",
"display": "Primary Work"
}
]
}
}
]
}
}
},
{
"label": "Primary Home Fax",
"valueContactPoint": {
"system": "fax",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "FAX",
"display": "Fax"
}
]
}
}
]
},
"value": "...",
"use": "home",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "HP",
"display": "Primary Home"
}
]
}
}
]
}
}
},
{
"label": "Temporary Fax",
"valueContactPoint": {
"system": "fax",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "FAX",
"display": "Fax"
}
]
}
}
]
},
"value": "...",
"use": "temp",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "TMP",
"display": "Temporary"
}
]
}
}
]
}
}
},
{
"label": "Primary Work Fax",
"valueContactPoint": {
"system": "fax",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.60.40.4.22.1",
"code": "FAX",
"display": "Fax"
}
]
}
}
]
},
"value": "...",
"use": "work",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "WP",
"display": "Primary Work"
}
]
}
}
]
}
}
},
{
"label": "Primary Home Mobile Phone",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "MC",
"display": "Mobile Phone"
}
]
}
}
]
},
"value": "...",
"use": "mobile",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "HP",
"display": "Primary Home"
}
]
}
}
]
}
}
},
{
"label": "Temporary Mobile Phone",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "MC",
"display": "Mobile Phone"
}
]
}
}
]
},
"value": "...",
"use": "temp",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "TMP",
"display": "Temporary"
}
]
}
}
]
}
}
},
{
"label": "Primary Work Mobile Phone",
"valueContactPoint": {
"system": "phone",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "MC",
"display": "Mobile Phone"
}
]
}
}
]
},
"value": "...",
"use": "mobile",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "WP",
"display": "Primary Work"
}
]
}
}
]
}
}
},
{
"label": "Primary Home Pager",
"valueContactPoint": {
"system": "pager",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "PG",
"display": "Pager"
}
]
}
}
]
},
"value": "...",
"use": "home",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "HP",
"display": "Primary Home"
}
]
}
}
]
}
}
},
{
"label": "Temporary Pager",
"valueContactPoint": {
"system": "pager",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "PG",
"display": "Pager"
}
]
}
}
]
},
"value": "...",
"use": "temp",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "TMP",
"display": "Temporary"
}
]
}
}
]
}
}
},
{
"label": "Primary Work Pager",
"valueContactPoint": {
"system": "pager",
"_system": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "PG",
"display": "Pager"
}
]
}
}
]
},
"value": "...",
"use": "work",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "WP",
"display": "Primary Work"
}
]
}
}
]
}
}
},
{
"label": "Private email address",
"valueContactPoint": {
"system": "email",
"value": "giesput@myweb.nl",
"use": "home",
"_use": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/AddressUse",
"code": "HP",
"display": "Primary Home"
}
]
}
}
]
}
}
}
],
"mapping": [
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.1",
"comment": "ContactInformation"
}
]
},
{
"id": "ContactPoint.system",
"path": "ContactPoint.system",
"short": "TelecomType / EmailAddressType",
"alias": [
"TelecomSoort / EmailSoort"
],
"min": 1,
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.5",
"comment": "TelecomType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/TelecomSoortCodelijst-to-ContactPointSystem"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.19",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointSystem"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.19",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointSystem"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.8",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointSystem"
}
]
},
{
"id": "ContactPoint.system.extension",
"path": "ContactPoint.system.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "ContactPoint.system.extension:EmailAddressTypeCodelist",
"path": "ContactPoint.system.extension",
"sliceName": "EmailAddressTypeCodelist",
"short": "EmailAddressTypeCodelist",
"alias": [
"EmailSoortCodelijst"
],
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "ContactPoint.system.extension:EmailAddressTypeCodelist.valueCodeableConcept:valueCodeableConcept",
"path": "ContactPoint.system.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "EmailSoortCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.6.3--20171231000000",
"display": "EmailSoortCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.8",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointSystem"
}
]
},
{
"id": "ContactPoint.system.extension:TelecomTypeCodelist",
"path": "ContactPoint.system.extension",
"sliceName": "TelecomTypeCodelist",
"short": "TelecomTypeCodelist",
"alias": [
"TelecomSoortCodelijst"
],
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "ContactPoint.system.extension:TelecomTypeCodelist.valueCodeableConcept:valueCodeableConcept",
"path": "ContactPoint.system.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "TelecomSoortCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.6.1--20171231000000",
"display": "TelecomSoortCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.5",
"comment": "TelecomType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/TelecomSoortCodelijst-to-ContactPointSystem"
}
]
},
{
"id": "ContactPoint.value",
"path": "ContactPoint.value",
"short": "TelephoneNumber / EmailAddress",
"alias": [
"Telefoonnummer / E-mailadres"
],
"example": [
{
"label": "Example TelephoneNumber international",
"valueString": "+31611234567"
},
{
"label": "Example EmailAddress",
"valueString": "giesput@myweb.nl"
}
],
"mapping": [
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.23",
"comment": "TelephoneNumber"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.23",
"comment": "TelephoneNumber"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.4",
"comment": "EmailAddress"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.20",
"comment": "EmailAddress"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.20",
"comment": "EmailAddress"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.7",
"comment": "EmailAddress"
}
]
},
{
"id": "ContactPoint.use",
"path": "ContactPoint.use",
"short": "TelecomType / NumberType / EmailAddressType",
"definition": "Purpose of this contact point",
"alias": [
"TelecomSoort / NummerSoort / EmailSoort"
],
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.5",
"comment": "TelecomType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/TelecomSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.22",
"comment": "NumberType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/NummerSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.22",
"comment": "NumberType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/NummerSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.6",
"comment": "NumberType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/NummerSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.19",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.19",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointUse"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.8",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointUse"
}
]
},
{
"id": "ContactPoint.use.extension",
"path": "ContactPoint.use.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "ContactPoint.use.extension:EmailAddressTypeCodelist",
"path": "ContactPoint.use.extension",
"sliceName": "EmailAddressTypeCodelist",
"short": "EmailAddressTypeCodelist",
"alias": [
"EmailSoortCodelijst"
],
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "ContactPoint.use.extension:EmailAddressTypeCodelist.valueCodeableConcept:valueCodeableConcept",
"path": "ContactPoint.use.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "EmailSoortCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.6.3--20171231000000",
"display": "EmailSoortCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.8",
"comment": "EmailAddressType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/EmailSoortCodelijst-to-ContactPointUse"
}
]
},
{
"id": "ContactPoint.use.extension:TelecomTypeCodelist.valueCodeableConcept:valueCodeableConcept",
"path": "ContactPoint.use.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "TelecomSoortCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.6.1--20171231000000",
"display": "TelecomSoortCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.5",
"comment": "TelecomType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/TelecomSoortCodelijst-to-ContactPointUse"
}
]
},
{
"id": "ContactPoint.use.extension:NumberTypeCodelist",
"path": "ContactPoint.use.extension",
"sliceName": "NumberTypeCodelist",
"short": "NumberTypeCodelist",
"alias": [
"NummerSoortCodelijst"
],
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/code-specification"
}
]
},
{
"id": "ContactPoint.use.extension:NumberTypeCodelist.valueCodeableConcept:valueCodeableConcept",
"path": "ContactPoint.use.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"description": "NummerSoortCodelijst",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.6.2--20171231000000",
"display": "NummerSoortCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.6",
"comment": "NumberType. See for details the ConceptMap https://simplifier.net/resolve?target=simplifier&canonical=http://nictiz.nl/fhir/ConceptMap/NummerSoortCodelijst-to-ContactPointUse"
}
]
}
]
}
}

View File

@ -0,0 +1,217 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-episodeofcare",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-episodeofcare",
"version": "1.1.1",
"name": "nl-core-episodeofcare",
"title": "nl-core-episodeofcare",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "An EpisodeOfCare resource as defined for the Dutch realm",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-concernfortransfer-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/ConcernForTransfer-v1.2(2015EN)",
"name": "HCIM ConcernForTransfer-v1.2(2015EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "EpisodeOfCare",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "EpisodeOfCare.extension",
"path": "EpisodeOfCare.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "EpisodeOfCare.extension:dateFirstEncounter",
"path": "EpisodeOfCare.extension",
"sliceName": "dateFirstEncounter",
"comment": "For episodes of care it can be relevant, and always is in general practitioner workflow, when the first encounter was that a problem/concern was discussed.",
"min": 0,
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/EpisodeOfCare-DateFirstEncounter"
}
]
},
{
"id": "EpisodeOfCare.extension:dateLastEncounter",
"path": "EpisodeOfCare.extension",
"sliceName": "dateLastEncounter",
"comment": "For episodes of care it can be relevant, and always is in general practitioner workflow, when the last encounter was that a problem/concern was discussed.",
"min": 0,
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/EpisodeOfCare-DateLastEncounter"
}
]
},
{
"id": "EpisodeOfCare.extension:title",
"path": "EpisodeOfCare.extension",
"sliceName": "title",
"comment": "For episodes of care it can be relevant to carry the title that the episode of care is known as for the physisian. This is standard for general practitioner workflow. Usually it is the common name for the latest associated Condition",
"min": 0,
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/EpisodeOfCare-Title"
}
]
},
{
"id": "EpisodeOfCare.identifier",
"path": "EpisodeOfCare.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "EpisodeOfCare.type.text",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
"valueBoolean": true
}
],
"path": "EpisodeOfCare.type.text",
"short": "ConcernLabel",
"definition": "If needed, a short, written description of the concern. Mainly in first-line care this will be used for the episode name.",
"alias": [
"ConcernLabel"
],
"mapping": [
{
"identity": "hcim-concernfortransfer-v1.2-2015EN",
"map": "NL-CM:5.1.9",
"comment": "ConcernLabel"
}
]
},
{
"id": "EpisodeOfCare.diagnosis.condition",
"path": "EpisodeOfCare.diagnosis.condition",
"type": [
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Problem"
}
]
},
{
"id": "EpisodeOfCare.patient",
"path": "EpisodeOfCare.patient",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.11",
"comment": "Subject"
}
]
},
{
"id": "EpisodeOfCare.managingOrganization",
"path": "EpisodeOfCare.managingOrganization",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
},
{
"id": "EpisodeOfCare.period",
"path": "EpisodeOfCare.period",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.14",
"comment": "DateTime"
}
]
},
{
"id": "EpisodeOfCare.careManager",
"path": "EpisodeOfCare.careManager",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
}
]
},
{
"id": "EpisodeOfCare.careManager.extension",
"path": "EpisodeOfCare.careManager.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "EpisodeOfCare.careManager.extension:practitionerRole",
"path": "EpisodeOfCare.careManager.extension",
"sliceName": "practitionerRole",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
}
]
}
]
}
}

View File

@ -0,0 +1,115 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-healthcareservice",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-healthcareservice",
"version": "2.0.1",
"name": "nl-core-healthcareservice",
"title": "nl-core-healthcareservice",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A HealthcareService resource as defined for the Dutch realm",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
}
],
"kind": "resource",
"abstract": false,
"type": "HealthcareService",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/HealthcareService",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "HealthcareService.providedBy",
"path": "HealthcareService.providedBy",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
},
{
"id": "HealthcareService.location",
"path": "HealthcareService.location",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-location"
}
]
},
{
"id": "HealthcareService.telecom",
"path": "HealthcareService.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "TelephoneNumber"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "TelephoneNumber"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.4",
"comment": "TelephoneNumber"
}
]
},
{
"id": "HealthcareService.coverageArea",
"path": "HealthcareService.coverageArea",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-location"
}
]
}
]
}
}

View File

@ -0,0 +1,497 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-humanname",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-humanname",
"version": "2.0.5",
"name": "nl-core-humanname",
"title": "nl-core-humanname",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Base datatype for HumanName Type with additions for Dutch realm names. Dutch names break down the family into maximum of 4 parts that are important to know separately in some if not most use cases.",
"purpose": "Name information is used to identify and address person.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "NameInformation as part of HCIM Patient-v2.0.1(2015EN)",
"comment": "NameInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "NameInformation as part of HCIM Patient-v3.0(2016EN)",
"comment": "NameInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"uri": "https://zibs.nl/wiki/NameInformation-v1.0.1(2017EN)",
"name": "HCIM NameInformation-v1.0.1(2017EN)"
},
{
"identity": "BRP",
"uri": "https://nl.wikipedia.org/wiki/Basisregistratie_Personen",
"name": "Basisregistratie Personen",
"comment": "Voorheen GBA - Gemeentelijke basisregistratie"
}
],
"kind": "complex-type",
"abstract": false,
"type": "HumanName",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/HumanName",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "HumanName",
"path": "HumanName",
"comment": "Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts may or may not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely.\r\n\r\nA Dutch HumanName is a proper FHIR HumanName. Systems that do not understand any of the extensions, will be able to render and work with a Dutch name. Dutch names make certain name parts seaprately communicable. These parts are required for use in true Dutch systems when dealing with Dutch names, but may not have value for international systems when information gets sent abroad.\r\n\r\nTo have true compatibility an implementer SHOULD use the core HumanName parts as intended. To have names work for Dutch context, the implementer SHOULD in addition use the extension elements.\r\n\r\nThe extension elements cover birth name (NL: eigennaam / geslachtsnaam) and partner/spouse name. Both may have a prefix (NL: voorvoegsel). When a person marries, he or she may keep their own name, assume the partner name, append the partner name to their own name, or the other way around.\r\n\r\nFor this reason, there are extensions for marking each part for what it is. \r\n\r\nExample: miss Irma Jongeneel marries mister de Haas and assumes the name Irma Jongeneel-de Haas\r\nfamily = \"Jongeneel-de Haas\"\r\ngiven = \"Irma\"\r\nhumanname-own-name = \"Jongeneel\"\r\nhumanname-partner-prefix = \"de \"\r\nhumanname-partner-name = \"Haas\"",
"example": [
{
"label": "Structured HumanName (preferred above unstructured)",
"valueHumanName": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order",
"valueCode": "NL4"
}
],
"use": "official",
"family": "Jongeneel-de Haas",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString": "Jongeneel"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix",
"valueString": "de"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-partner-name",
"valueString": "Haas"
}
]
},
"given": [
"Irma",
"I."
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "CL"
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "IN"
}
]
}
]
}
},
{
"label": "Unstructured HumanName",
"valueHumanName": {
"use": "official",
"text": "Irma Jongeneel-de Haas"
}
}
],
"constraint": [
{
"key": "nl-core-humanname-1",
"severity": "error",
"human": "if you specify a prefix for an own name then an own name is also expected",
"expression": "name.family.extension('http://hl7.org/fhir/StructureDefinition/humanname-own-prefix').empty().not() implies name.family.extension('http://hl7.org/fhir/StructureDefinition/humanname-own-name').empty().not()",
"xpath": "not(f:extension[@url='http://hl7.org/fhir/StructureDefinition/humanname-own-prefix']) or f:extension[@url='http://hl7.org/fhir/StructureDefinition/humanname-own-name']"
},
{
"key": "nl-core-humanname-2",
"severity": "error",
"human": "if you specify a voorvoegsel for a partner name then a partner name is also expected",
"expression": "name.family.extension('http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix').empty().not() implies name.family.extension('http://hl7.org/fhir/StructureDefinition/humanname-partner-name').empty().not()",
"xpath": "not(f:extension[@url='http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix']) or f:extension[@url='http://hl7.org/fhir/StructureDefinition/humanname-partner-name']"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.6",
"comment": "NameInformation"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.6",
"comment": "NameInformation"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.1",
"comment": "NameInformation"
},
{
"identity": "BRP",
"map": "02",
"comment": "Naam"
}
]
},
{
"id": "HumanName.extension",
"path": "HumanName.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "HumanName.extension:humannameAssemblyOrder",
"path": "HumanName.extension",
"sliceName": "humannameAssemblyOrder",
"alias": [
"Voorkeursvolgorde van de naamdelen."
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.34",
"comment": "NameUsage. Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/NaamgebruikCodelijst-to-HumanNameAssemblyOrder"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.34",
"comment": "NameUsage. Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/NaamgebruikCodelijst-to-HumanNameAssemblyOrder"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.7",
"comment": "NameUsage. Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/NaamgebruikCodelijst-to-HumanNameAssemblyOrder"
}
]
},
{
"id": "HumanName.text",
"path": "HumanName.text",
"mapping": [
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
}
]
},
{
"id": "HumanName.family",
"path": "HumanName.family",
"short": "Surname",
"alias": [
"Achternaam"
]
},
{
"id": "HumanName.family.extension",
"path": "HumanName.family.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "HumanName.family.extension:humannameOwnPrefix",
"path": "HumanName.family.extension",
"sliceName": "humannameOwnPrefix",
"short": "PrefixOwnName",
"definition": "The prefix portion (e.g. voorvoegsel) inclusive of the space between the prefix and the surname, if applicable, of the family name that is derived from the person's own surname, as distinguished from any portion that is derived from the surname of the person's partner or spouse.",
"alias": [
"VoorvoegselGeslachtsnaam"
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.38",
"comment": "Prefix"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.38",
"comment": "Prefix"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.11",
"comment": "Prefix"
}
]
},
{
"id": "HumanName.family.extension:humannameOwnPrefix.valueString:valueString",
"path": "HumanName.family.extension.valueString",
"sliceName": "valueString"
},
{
"id": "HumanName.family.extension:humannameOwnName",
"path": "HumanName.family.extension",
"sliceName": "humannameOwnName",
"short": "OwnName",
"definition": "The persons official last name.",
"comment": "The portion of the family name that is derived from the person's own surname, as distinguished from any portion that is derived from the surname of the person's partner or spouse. If the person's surname has legally changed to become (or incorporate) the surname of the person's partner or spouse, this is the person's surname immediately prior to such change. Often this is the person's \"maiden name\".",
"alias": [
"Geslachtsnaam"
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/humanname-own-name"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.24",
"comment": "LastName"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.24",
"comment": "LastName"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.10",
"comment": "LastName"
}
]
},
{
"id": "HumanName.family.extension:humannameOwnName.valueString:valueString",
"path": "HumanName.family.extension.valueString",
"sliceName": "valueString"
},
{
"id": "HumanName.family.extension:humannamePartnerPrefix",
"path": "HumanName.family.extension",
"sliceName": "humannamePartnerPrefix",
"short": "PrefixSurname",
"definition": "Voorvoegsel derived from person's partner's surname inclusive of the space between the prefix and the surname, if applicable.",
"alias": [
"VoorvoegselGeslachtsnaamPartner"
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.39",
"comment": "PartnerPrefix"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.39",
"comment": "PartnerPrefix"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.9",
"comment": "PartnerPrefix"
}
]
},
{
"id": "HumanName.family.extension:humannamePartnerPrefix.valueString:valueString",
"path": "HumanName.family.extension.valueString",
"sliceName": "valueString"
},
{
"id": "HumanName.family.extension:humannamePartnerName",
"path": "HumanName.family.extension",
"sliceName": "humannamePartnerName",
"short": "LastNamePartner",
"definition": "Partners official last name.",
"comment": "The portion of the family name that is derived from the person's partner's surname, as distinguished from any portion that is derived from the surname of the person's own name. If the person's surname has legally changed to become (or incorporate) the surname of the person's partner or spouse, this is the person's surname immediately prior to such change. Often this is the person's \"maiden name\".",
"alias": [
"GeslachtsnaamPartner"
],
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/humanname-partner-name"
}
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.25",
"comment": "PartnerLastName"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.25",
"comment": "PartnerLastName"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.8",
"comment": "PartnerLastName"
}
]
},
{
"id": "HumanName.family.extension:humannamePartnerName.valueString:valueString",
"path": "HumanName.family.extension.valueString",
"sliceName": "valueString"
},
{
"id": "HumanName.given",
"path": "HumanName.given",
"short": "Given",
"definition": "Note that in order to mark the type of a given name, that you use the FHIR standard extension for ISO 21090 EN Qualifiers. Examples include call me name (Dutch: roepnaam) and initials. Each initial is expected to be delimited by a dot.",
"comment": "To be conformant to the Zib for NameInformation, at least the following qualifiers SHALL be supported: BR, IN and CL. The qualifier 'BR' maps to the Zib concept FirstNames, 'IN' maps to Initials and 'CL' to GivenName.",
"alias": [
"Voornamen",
"Initialen",
"Roepnaam"
],
"mapping": [
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.26",
"comment": "FirstNames. Qualifier 'BR'"
},
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.35",
"comment": "Initials. Qualifier 'IN'"
},
{
"identity": "hcim-nameinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.27",
"comment": "GivenName. Qualifier 'CL'"
},
{
"identity": "BRP",
"map": "02.10",
"comment": "Voornamen"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.26",
"comment": "FirstNames. Qualifier 'BR'"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.35",
"comment": "Initials. Qualifier 'IN'"
},
{
"identity": "hcim-nameinformation-v3.0-2016EN",
"map": "NL-CM:0.1.27",
"comment": "GivenName. Qualifier 'CL'"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.4",
"comment": "FirstNames. Qualifier 'BR'"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.5",
"comment": "Initials. Qualifier 'IN'"
},
{
"identity": "hcim-nameinformation-v1.0.1-2017EN",
"map": "NL-CM:20.4.6",
"comment": "GivenName. Qualifier 'CL'"
}
]
},
{
"id": "HumanName.given.extension",
"path": "HumanName.given.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "HumanName.given.extension:iso21090EnQualifier",
"path": "HumanName.given.extension",
"sliceName": "iso21090EnQualifier",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"
}
]
},
{
"id": "HumanName.given.extension:iso21090EnQualifier.valueCode:valueCode",
"path": "HumanName.given.extension.valueCode",
"sliceName": "valueCode"
}
]
}
}

View File

@ -0,0 +1,185 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-location",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-location",
"version": "2.0.1",
"name": "nl-core-location",
"title": "nl-core-location",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A Location resource as defined for the Dutch realm",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)"
},
{
"identity": "hcim-addressinformation-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/AddressInformation-v1.0(2017EN)",
"name": "HCIM AddressInformation-v1.0(2017EN)"
},
{
"identity": "hcim-dispense-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/Dispense-v1.0(2017EN)",
"name": "HCIM Dispense-v1.0(2017EN)"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"uri": "https://zibs.nl/wiki/HealthcareProvider-v3.1.1(2017EN)",
"name": "HCIM HealthcareProvider-v3.1.1(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "Location",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Location",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Location.name",
"path": "Location.name",
"short": "LocationName",
"alias": [
"OrganizationLocation",
"OrganisatieLocatie",
"DispenseLocation",
"Afleverlocatie"
],
"mapping": [
{
"identity": "hcim-dispense-v1.0-2017EN",
"map": "NL-CM:9.9.20925",
"comment": "DispenseLocation"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.8",
"comment": "OrganizationLocation"
}
]
},
{
"id": "Location.telecom",
"path": "Location.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.1",
"comment": "ContactInformation"
},
{
"identity": "art-decor-eafspraak",
"map": "eafspraak-dataelement-40",
"comment": "Contactgegevens"
}
]
},
{
"id": "Location.address",
"path": "Location.address",
"short": "AddressInformation",
"alias": [
"Adresgegevens"
],
"type": [
{
"code": "Address",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address"
}
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-addressinformation-v3.1-2017EN",
"map": "NL-CM:20.5.1",
"comment": "AddressInformation"
}
]
},
{
"id": "Location.managingOrganization",
"path": "Location.managingOrganization",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
],
"mapping": [
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.1",
"comment": "HealthcareProvider"
}
]
},
{
"id": "Location.partOf",
"path": "Location.partOf",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-location"
}
]
}
]
}
}

View File

@ -0,0 +1,166 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-observation",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-observation",
"version": "1.0.0",
"name": "nl-core-observation",
"title": "nl-core-observation",
"status": "active",
"publisher": "Nictiz",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A Observation Resource as defined by the Dutch Health and Care Information models or HCIM (Dutch: Zorginformatiebouwsteen or ZIB).",
"purpose": "Purpose is to make an universal observation core profile on which other HCIM Observation can be based, greatly reducing double administration.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "Observation",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Observation.identifier",
"path": "Observation.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "Observation.subject",
"path": "Observation.subject",
"min": 1,
"type": [
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
},
{
"code": "Reference",
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-location"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.11",
"comment": "Subject"
}
]
},
{
"id": "Observation.context",
"path": "Observation.context",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-episodeofcare"
},
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/zib-Encounter"
},
{
"code": "Reference",
"targetProfile": "http://nictiz.nl/fhir/StructureDefinition/gp-Encounter"
}
]
},
{
"id": "Observation.effective[x]",
"path": "Observation.effective[x]",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.14",
"comment": "DateTime"
}
]
},
{
"id": "Observation.performer",
"path": "Observation.performer",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.7",
"comment": "Author"
}
]
},
{
"id": "Observation.performer.extension",
"path": "Observation.performer.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "Observation.performer.extension:practitionerRole",
"path": "Observation.performer.extension",
"sliceName": "practitionerRole",
"max": "1",
"type": [
{
"code": "Extension",
"profile": "http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference"
}
]
}
]
}
}

View File

@ -0,0 +1,499 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-organization",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization",
"version": "2.0.3",
"name": "nl-core-organization",
"title": "nl-core-organization",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Organization, e.g. Health Provider or Insurance Company. Functional requirements taken from Health and Care Information models (Zorginformatiebouwsteen) HealthProvider v3.1.1 (release 2017) and Payer v3.1 (release 2017) via the Basic Care Data Set (Basisgegevensset Zorg 1.0). Names and addresses are also in compliance with HL7 V3 Basic Components. Every instantiation of an Organization is a top level organization or a part of an (top level) organization, e.g. Department of Radiology.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/HealthcareProvider-v1.2(2015EN)",
"name": "HCIM HealthcareProvider-v1.2(2015EN)"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/HealthcareProvider-v3.0(2016EN)",
"name": "HCIM HealthcareProvider-v3.0(2016EN)"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"uri": "https://zibs.nl/wiki/HealthcareProvider-v3.1.1(2017EN)",
"name": "HCIM HealthcareProvider-v3.1.1(2017EN)"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-payer-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/Payer-v1.2(2015EN)",
"name": "HCIM Payer-v1.2(2015EN)"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Payer-v3.0(2016EN)",
"name": "HCIM Payer-v3.0(2016EN)"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/Payer-v3.1(2017EN)",
"name": "HCIM Payer-v3.1(2017EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "Organization",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Organization",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Organization",
"path": "Organization",
"short": "HealthcareProvider",
"alias": [
"Zorgaanbieder"
],
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.1",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.1",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.1",
"comment": "HealthcareProvider"
}
]
},
{
"id": "Organization.identifier",
"path": "Organization.identifier",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
},
"definition": "The organizations identification number. For Dutch healthcare providers, the URA number or the AGB number is used, if possible. For foreign or non-affiliated healthcare providers, another unique identification number can be used. This must be accompanied by the name and/or code of the issuing organization.",
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.2",
"comment": "HealthcareProviderIdentificationNumber"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.2",
"comment": "HealthcareProviderIdentificationNumber"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.2",
"comment": "HealthcareProviderIdentificationNumber"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "Organization.identifier:URA",
"path": "Organization.identifier",
"sliceName": "URA",
"short": "URA",
"alias": [
"URA"
]
},
{
"id": "Organization.identifier:URA.system",
"path": "Organization.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/ura"
},
{
"id": "Organization.identifier:URA.value",
"path": "Organization.identifier.value",
"short": "URA (UZI-register abonneenummer)",
"alias": [
"URA (UZI-register abonneenummer)"
],
"min": 1,
"example": [
{
"label": "Example URA",
"valueString": "12345678"
}
]
},
{
"id": "Organization.identifier:AGB",
"path": "Organization.identifier",
"sliceName": "AGB",
"short": "AGB",
"alias": [
"AGB"
]
},
{
"id": "Organization.identifier:AGB.system",
"path": "Organization.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/agb-z"
},
{
"id": "Organization.identifier:AGB.value",
"path": "Organization.identifier.value",
"short": "AGB-Z (Vektis AGB-Z zorgverlenertabel)",
"alias": [
"AGB-Z (Vektis AGB-Z zorgverlenertabel)"
],
"min": 1
},
{
"id": "Organization.identifier:UZOVI",
"path": "Organization.identifier",
"sliceName": "UZOVI",
"short": "UZOVI",
"definition": "Unique healthcare insurance company identification (the UZOVI number).",
"alias": [
"UZOVI"
],
"mapping": [
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.7",
"comment": "IdentificationNumber"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.7",
"comment": "IdentificationNumber"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.7",
"comment": "IdentificationNumber"
}
]
},
{
"id": "Organization.identifier:UZOVI.system",
"path": "Organization.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/uzovi"
},
{
"id": "Organization.identifier:UZOVI.value",
"path": "Organization.identifier.value",
"short": "Unique healthcare insurance company identification (the UZOVI number)",
"alias": [
"Unieke zorgverekeraar identificatie (het UZOVI-nummer)"
],
"min": 1
},
{
"id": "Organization.type",
"path": "Organization.type",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "coding.system"
}
],
"rules": "open"
}
},
{
"id": "Organization.type:organizationType",
"path": "Organization.type",
"sliceName": "organizationType",
"short": "OrganizationType",
"definition": "The type of healthcare provider, such as general hospital, or nursing home. If this field is filled in and an AGB code is used for the HealthcareProviderIdentificationNumber, the type must match the type implicitly contained in the AGB code.",
"alias": [
"OrganisatieType"
],
"binding": {
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.2.3--20171231000000",
"display": "OrganisatieTypeCodelijst"
}
},
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.4",
"comment": "OrganizationType"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.4",
"comment": "OrganizationType"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.4",
"comment": "OrganizationType"
}
]
},
{
"id": "Organization.type:departmentSpecialty",
"path": "Organization.type",
"sliceName": "departmentSpecialty",
"short": "DepartmentSpecialty",
"definition": "The specialty of the healthcare providers department, e.g. Cardiology. The departmental specialty can be filled in if further indication of the healthcare provider is needed. This refers to the recognized medical specialties as stated in the BIG Act.",
"alias": [
"AfdelingSpecialisme"
],
"binding": {
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.2.4--20171231000000",
"display": "AfdelingSpecialismeCodelijst"
}
},
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.7",
"comment": "DepartmentSpecialty"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.7",
"comment": "DepartmentSpecialty"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.7",
"comment": "DepartmentSpecialty"
}
]
},
{
"id": "Organization.name",
"path": "Organization.name",
"short": "OrganizationName or DepartmentName",
"definition": "The full name associated with the organization, which may include information about the organization's location. Specifics of the parent organization can be found through the partOf element.",
"alias": [
"OrganisatieNaam of AfdelingNaam"
],
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.3",
"comment": "OrganizationName"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.3",
"comment": "OrganizationName"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.3",
"comment": "OrganizationName"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.16",
"comment": "OrganizationName"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.16",
"comment": "OrganizationName"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.16",
"comment": "OrganizationName"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.8",
"comment": "OrganizationLocation"
}
]
},
{
"id": "Organization.alias",
"path": "Organization.alias",
"short": "OrganizationAlias",
"definition": "Other names that this Organization is known as.",
"alias": [
"OrganisatieAlias"
]
},
{
"id": "Organization.telecom",
"path": "Organization.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.6",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.1",
"comment": "ContactInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.12",
"comment": "ContactInformation"
}
]
},
{
"id": "Organization.address",
"path": "Organization.address",
"short": "AddressInformation",
"alias": [
"Adresgegevens"
],
"type": [
{
"code": "Address",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address"
}
],
"mapping": [
{
"identity": "hcim-healthcareprovider-v1.2-2015EN",
"map": "NL-CM:17.2.5",
"comment": "Address"
},
{
"identity": "hcim-healthcareprovider-v3.0-2016EN",
"map": "NL-CM:17.2.5",
"comment": "Address"
},
{
"identity": "hcim-healthcareprovider-v3.1.1-2017EN",
"map": "NL-CM:17.2.5",
"comment": "AddressInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.17",
"comment": "AddressInformation"
}
]
},
{
"id": "Organization.partOf",
"path": "Organization.partOf",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
}
]
}
}

View File

@ -0,0 +1,261 @@
{
"resourceType": "Patient",
"id": "nl-core-patient-01",
"meta": {
"profile": [
"http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
]
},
"identifier": [
{
"use": "official",
"system": "http://fhir.nl/fhir/NamingSystem/bsn",
"value": "999911120"
}
],
"active": true,
"name": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order",
"valueCode": "NL4"
}
],
"use": "official",
"family": "XXX_Helleman",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString": "XXX_Helleman"
}
]
},
"given": [
"Johan",
"J."
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "CL"
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "IN"
}
]
}
]
}
],
"telecom": [
{
"system": "phone",
"value": "06-12345678",
"use": "mobile"
},
{
"system": "email",
"value": "XXX_Helleman@hotmail.com",
"use": "home"
}
],
"gender": "male",
"birthDate": "1964-07-25",
"deceasedBoolean": false,
"address": [
{
"extension": [
{
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-address-official",
"valueBoolean": true
}
],
"use": "home",
"type": "both",
"line": [
"Knolweg 1000"
],
"_line": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName",
"valueString": "Knolweg"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber",
"valueString": "1000"
}
]
}
],
"city": "Stitswerd",
"district": "Nederland",
"postalCode": "9999XA",
"country": "NLD",
"_country": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.4.16.34",
"code": "6030",
"display": "Nederland"
}
]
}
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/MaritalStatus",
"code": "M",
"display": "Married"
}
]
},
"multipleBirthBoolean": false,
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.3.11.22.472",
"code": "1",
"display": "Eerste relatie/contactpersoon"
}
]
},
{
"coding": [
{
"system": "http://hl7.org/fhir/v3/RoleCode",
"code": "WIFE",
"display": "Wife"
}
]
}
],
"name": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-assembly-order",
"valueCode": "NL4"
}
],
"use": "official",
"family": "van Putten XXX_Helleman",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "van"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString": "Putten"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-partner-name",
"valueString": "XXX_Helleman"
}
]
},
"given": [
"Jannie",
"J.P.M."
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "CL"
}
]
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "IN"
}
]
}
]
},
"telecom": [
{
"system": "phone",
"value": "06-12345645",
"use": "mobile"
},
{
"system": "email",
"value": "j.vanderjutte@example.com"
}
],
"address": {
"use": "home",
"line": [
"Knolweg 1000"
],
"_line": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName",
"valueString": "Knolweg"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber",
"valueString": "1000"
}
]
}
],
"city": "Sitswerd",
"postalCode": "9999XA",
"country": "Nederland",
"_country": {
"extension": [
{
"url": "http://nictiz.nl/fhir/StructureDefinition/code-specification",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.4.4.16.34",
"code": "6030",
"display": "Nederland"
}
]
}
}
]
}
}
}
],
"generalPractitioner": [
{
"reference": "Organization/nl-core-organization-01",
"display": "Maatschap Vaste Huisarts"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,517 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-person",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-person",
"version": "1.0.1",
"name": "nl-core-person",
"title": "nl-core-person",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A Person resource as defined by the Dutch Health and Care Information models or HCIM (Dutch: Zorginformatiebouwsteen or ZIB) ContactPersoon version 1.2 (Release 2015). The HCIM ContactPerson is meant to deal with both related persons and contacts. This profile targets instantiations of the HCIM ContactPerson who are related persons. An HCIM ContactPerson who is a contact for a patient, belongs in Patient.contact. If a person is both a related person and a contact person, then some data duplication is inevitable. This may or may not be resolved in a future version of the Patient/Person resources.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2015EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2015EN)",
"name": "HCIM BasicElements-v1.0(2015EN)"
},
{
"identity": "hcim-patient-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)"
},
{
"identity": "hcim-contactperson-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v1.2(2015EN)",
"name": "HCIM ContactPerson-v1.2(2015EN)"
},
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v1.2.1(2015EN)",
"name": "HCIM HealthProfessional-v1.2.1(2015EN)"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/Payer-v1.2(2015EN)",
"name": "HCIM Payer-v1.2(2015EN)"
},
{
"identity": "hcim-basicelements-v1.0-2016EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2016EN)",
"name": "HCIM BasicElements-v1.0(2016EN)"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v3.0(2016EN)",
"name": "HCIM ContactPerson-v3.0(2016EN)"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.0(2016EN)",
"name": "HCIM HealthProfessional-v3.0(2016EN)"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Payer-v3.0(2016EN)",
"name": "HCIM Payer-v3.0(2016EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/Patient-v3.1(2017EN)",
"name": "HCIM Patient-v3.1(2017EN)"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v3.1(2017EN)",
"name": "HCIM ContactPerson-v3.1(2017EN)"
},
{
"identity": "hcim-healthprofessional-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.1(2017EN)",
"name": "HCIM HealthProfessional-v3.1(2017EN)"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/Payer-v3.1(2017EN)",
"name": "HCIM Payer-v3.1(2017EN)"
},
{
"identity": "hcim-contactinformation-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v3.1(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "Person",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Person",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Person.identifier",
"path": "Person.identifier",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
},
"short": "Identifier",
"definition": "Identification of the person. This is different from the identification of the persons role as patient/practitioner/contact. Some identifiers however are both in practice like the Dutch burgerservicenummer.",
"alias": [
"Identificatienummer"
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2015EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
},
{
"identity": "hcim-basicelements-v1.0-2016EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
},
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.7",
"comment": "PatientIdentificationNumber"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.7",
"comment": "PatientIdentificationNumber"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.7",
"comment": "PatientIdentificationNumber"
}
]
},
{
"id": "Person.identifier:BSN",
"path": "Person.identifier",
"sliceName": "BSN",
"short": "BSN",
"alias": [
"BSN"
],
"max": "1"
},
{
"id": "Person.identifier:BSN.system",
"path": "Person.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/bsn"
},
{
"id": "Person.identifier:BSN.value",
"path": "Person.identifier.value",
"short": "BSN (Burgerservicenummer (Dutch person identification number))",
"alias": [
"BSN"
],
"min": 1,
"example": [
{
"label": "Example of a burgerservicenummer",
"valueString": "123456782"
}
]
},
{
"id": "Person.name",
"path": "Person.name",
"short": "NameInformation",
"alias": [
"Naamgegevens"
],
"type": [
{
"code": "HumanName",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-humanname"
}
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.6",
"comment": "NameInformation"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.6",
"comment": "NameInformation"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.6",
"comment": "NameInformation"
},
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.4",
"comment": "Name"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.4",
"comment": "Name"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.4",
"comment": "NameInformation"
},
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.3",
"comment": "HealthcareProviderName"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.3",
"comment": "HealthcareProviderName"
},
{
"identity": "hcim-healthprofessional-v3.1-2017EN",
"map": "NL-CM:17.1.3",
"comment": "NameInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
}
]
},
{
"id": "Person.telecom",
"path": "Person.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.6",
"comment": "ContactInformation"
},
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.1-2017EN",
"map": "NL-CM:17.1.8",
"comment": "ContactInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.12",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v3.1-2017EN",
"map": "NL-CM:20.6.2",
"comment": "TelephoneNumbers"
},
{
"identity": "hcim-contactinformation-v3.1-2017EN",
"map": "NL-CM:20.6.3",
"comment": "EmailAddresses"
}
]
},
{
"id": "Person.gender",
"path": "Person.gender",
"short": "Gender",
"alias": [
"Geslacht"
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.9",
"comment": "Gender Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/GeslachtCodelijst-to-administrative-gender"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.9",
"comment": "Gender Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/GeslachtCodelijst-to-administrative-gender"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.9",
"comment": "Gender Use FHIR Core ConceptMap for HCIM mapping: http://nictiz.nl/fhir/ConceptMap/GeslachtCodelijst-to-administrative-gender"
}
]
},
{
"id": "Person.birthDate",
"path": "Person.birthDate",
"short": "Persons date of birth. An incomplete date, e.g. only year or only year + month, is permitted.",
"alias": [
"Geboortedatum"
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.10",
"comment": "DateOfBirth"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.10",
"comment": "DateOfBirth"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.10",
"comment": "DateOfBirth"
}
]
},
{
"id": "Person.address",
"path": "Person.address",
"short": "AddressInformation",
"alias": [
"Adresgegevens"
],
"type": [
{
"code": "Address",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address"
}
],
"mapping": [
{
"identity": "hcim-patient-v2.0.1-2015EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-patient-v3.0-2016EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-patient-v3.1-2017EN",
"map": "NL-CM:0.1.4",
"comment": "AddressInformation"
},
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.5",
"comment": "Address"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.5",
"comment": "Address"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.5",
"comment": "AddressInformation"
},
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.7",
"comment": "Address"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.7",
"comment": "Address"
},
{
"identity": "hcim-healthprofessional-v3.1-2017EN",
"map": "NL-CM:17.1.7",
"comment": "AddressInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.17",
"comment": "AddressInformation"
}
]
},
{
"id": "Person.managingOrganization",
"path": "Person.managingOrganization",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
},
{
"id": "Person.link.target",
"path": "Person.link.target",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson"
},
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-person"
}
]
}
]
}
}

View File

@ -0,0 +1,326 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-practitioner",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner",
"version": "2.0.2",
"name": "nl-core-practitioner",
"title": "nl-core-practitioner",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Functional requirements taken from Health and Care Information models (Zorginformatiebouwsteen) HealthProfessional v3.2 (release 2017). Names and addresses are also in compliance with HL7 V3 Basic Components.",
"purpose": "The purpose of this information model is documenting the identity of people providing healthcare. For health professionals, information must be sufficiently complete for reference and auditing: if known, the name is mandatory. If an identification number is given such as a UZI or AGB number, the name and number have to match.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v1.2.1(2015EN)",
"name": "HCIM HealthProfessional-v1.2.1(2015EN)"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.0(2016EN)",
"name": "HCIM HealthProfessional-v3.0(2016EN)"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.2(2017EN)",
"name": "HCIM HealthProfessional-v3.2(2017EN)"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "Practitioner",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Practitioner",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Practitioner",
"path": "Practitioner",
"short": "HealthcareProvider",
"alias": [
"Zorgverlener"
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.1",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.1",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.1",
"comment": "HealthProfessional"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.4",
"comment": "HealthProfessional"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.9",
"comment": "HealthProfessionalAsAuthor::HealthProfessional"
}
]
},
{
"id": "Practitioner.identifier",
"path": "Practitioner.identifier",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
},
"short": "HealthProfessionalIdentificationNumber",
"definition": "The healthcare provider identification number is a number that uniquely identifies the healthcare provider. \r\n\r\nThe following numbers are used in the Netherlands: \r\n1. UZI Health Professionals. Identification of health professionals (people) in the Dutch healthcare industry. \r\n2. VEKTIS AGB-Z. Identifies health professionals and healthcare organizations \r\n3. BIG-ID. The ID of the health professional listed in the BIG Register. \r\n\r\nThis information is not readily available for foreign health professionals.",
"alias": [
"ZorgverlenerIdentificatieNummer"
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.2",
"comment": "HealthcareProviderIdentificationNumber"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.2",
"comment": "HealthcareProviderIdentificationNumber"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.2",
"comment": "HealthProfessionalIdentificationNumber"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "Practitioner.identifier:UZI",
"path": "Practitioner.identifier",
"sliceName": "UZI",
"short": "UZI",
"definition": "Unieke Zorgverlener Identificatie (Dutch physician identification number)",
"alias": [
"UZI"
],
"max": "1"
},
{
"id": "Practitioner.identifier:UZI.system",
"path": "Practitioner.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/uzi-nr-pers"
},
{
"id": "Practitioner.identifier:UZI.value",
"path": "Practitioner.identifier.value",
"min": 1,
"example": [
{
"label": "Example",
"valueString": "01011234"
}
]
},
{
"id": "Practitioner.identifier:AGB",
"path": "Practitioner.identifier",
"sliceName": "AGB",
"short": "AGB",
"alias": [
"AGB"
],
"max": "1"
},
{
"id": "Practitioner.identifier:AGB.system",
"path": "Practitioner.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/agb-z"
},
{
"id": "Practitioner.identifier:AGB.value",
"path": "Practitioner.identifier.value",
"min": 1,
"example": [
{
"label": "Example",
"valueString": "123456"
}
]
},
{
"id": "Practitioner.identifier:BIG",
"path": "Practitioner.identifier",
"sliceName": "BIG",
"short": "BIG",
"alias": [
"BIG"
],
"max": "1"
},
{
"id": "Practitioner.identifier:BIG.system",
"path": "Practitioner.identifier.system",
"min": 1,
"fixedUri": "http://fhir.nl/fhir/NamingSystem/big"
},
{
"id": "Practitioner.identifier:BIG.value",
"path": "Practitioner.identifier.value",
"min": 1,
"example": [
{
"label": "Example",
"valueString": "12345678"
}
]
},
{
"id": "Practitioner.name",
"path": "Practitioner.name",
"short": "NameInformation",
"definition": "Health professionals full name. If a health professional identification number is entered, it will be the name as listed in UZI, AGB or by the healthcare center.",
"alias": [
"ZorgverlenerNaam"
],
"type": [
{
"code": "HumanName",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-humanname"
}
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.3",
"comment": "HealthcareProviderName"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.3",
"comment": "HealthcareProviderName"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.3",
"comment": "NameInformation"
}
]
},
{
"id": "Practitioner.telecom",
"path": "Practitioner.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.8",
"comment": "ContactInformation"
}
]
},
{
"id": "Practitioner.address",
"path": "Practitioner.address",
"short": "AddressInformation",
"alias": [
"Adresgegevens"
],
"type": [
{
"code": "Address",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address"
}
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.7",
"comment": "Address"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.7",
"comment": "Address"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.7",
"comment": "AddressInformation"
}
]
}
]
}
}

View File

@ -0,0 +1,254 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-practitionerrole",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitionerrole",
"version": "2.0.3",
"name": "nl-core-practitionerrole",
"title": "nl-core-practitionerrole",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Functional requirements taken from Health and Care Information models (Zorginformatiebouwsteen) HealthProfessional v3.2 (release 2017). Names and addresses are also in compliance with HL7 V3 Basic Components.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v1.2.1(2015EN)",
"name": "HCIM HealthProfessional-v1.2.1(2015EN)"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.0(2016EN)",
"name": "HCIM HealthProfessional-v3.0(2016EN)"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"uri": "https://zibs.nl/wiki/HealthProfessional-v3.2(2017EN)",
"name": "HCIM HealthProfessional-v3.2(2017EN)"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "PractitionerRole",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "PractitionerRole",
"path": "PractitionerRole",
"short": "HealthProfessionalRole",
"alias": [
"ZorgverlenerRol"
]
},
{
"id": "PractitionerRole.identifier",
"path": "PractitionerRole.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "PractitionerRole.practitioner",
"path": "PractitionerRole.practitioner",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner"
}
]
},
{
"id": "PractitionerRole.organization",
"path": "PractitionerRole.organization",
"short": "HealthcareProvider",
"alias": [
"Zorgaanbieder"
],
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.6",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.6",
"comment": "HealthcareProvider"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.6",
"comment": "HealthcareProvider"
}
]
},
{
"id": "PractitionerRole.code",
"path": "PractitionerRole.code",
"comment": "A person may have more than one role. Note: in earlier versions of this profile there used to be an association with the HCIM element NL-CM:17.1.5 HealthcareProviderRole. This mapping was semantically incorrect. The HCIM element is a property of the association of PractitionerRole to some healthcare act. In a number of FHIR Resources the association is implicit from the semantics of the resource element like in Observation.performer. In others you can make this explicit like Encounter.participant.type, CareTeam.participant.role and Procedure.performer.role. Please refer to the relevant profiles on those resources for associations with HCIM NL-CM:17.1.5 HealthcareProviderRole"
},
{
"id": "PractitionerRole.specialty",
"path": "PractitionerRole.specialty",
"short": "Specialty",
"definition": "Healthcare providers medical specialty. This refers to the recognized medical specialties as stated in the BIG Act. A PractitionerRole instance SHALL be a singular assocation between a person acting in a certain specialty for a certain organization. It's possible however that either specialty or organization or both is/are uknown. It is also possible that equivalent specialisms are available in multiple coding systems e.g. 01.015 UZI (Huisarts) and 0101 AGB (Huisartsen, niet apotheekhoudend). For this reason you may use multiple coding elements, each indicating the relevant code from a different system",
"alias": [
"Specialisme"
],
"max": "1",
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.4",
"comment": "Specialty"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.4",
"comment": "Specialty"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.4",
"comment": "Specialty"
}
]
},
{
"id": "PractitionerRole.specialty.coding",
"path": "PractitionerRole.specialty.coding",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "system"
}
],
"rules": "open"
}
},
{
"id": "PractitionerRole.specialty.coding:SpecialtyUZI",
"path": "PractitionerRole.specialty.coding",
"sliceName": "SpecialtyUZI",
"short": "SpecialtyUZI",
"alias": [
"SpecialismeUZI"
],
"binding": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "PractitionerSpecialty"
}
],
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.1.6--20171231000000",
"display": "SpecialismeUZICodelijst"
}
}
},
{
"id": "PractitionerRole.specialty.coding:SpecialtyAGB",
"path": "PractitionerRole.specialty.coding",
"sliceName": "SpecialtyAGB",
"short": "SpecialtyAGB",
"alias": [
"SpecialismeAGB"
],
"binding": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "PractitionerSpecialty"
}
],
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.1.7--20171231000000",
"display": "SpecialismeAGBCodelijst"
}
}
},
{
"id": "PractitionerRole.telecom",
"path": "PractitionerRole.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-healthprofessional-v1.2.1-2015EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.0-2016EN",
"map": "NL-CM:17.1.8",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-healthprofessional-v3.2-2017EN",
"map": "NL-CM:17.1.8",
"comment": "ContactInformation"
}
]
}
]
}
}

View File

@ -0,0 +1,55 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-preferred-pharmacy",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-preferred-pharmacy",
"version": "2.0.0",
"name": "nl core preferred pharmacy",
"title": "nl-core-preferred-pharmacy",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "References a patient's preferered pharmacy",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "complex-type",
"abstract": false,
"contextType": "resource",
"context": [
"Patient"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://fhir.nl/fhir/StructureDefinition/nl-core-preferred-pharmacy"
},
{
"id": "Extension.value[x]:valueReference",
"path": "Extension.valueReference",
"sliceName": "valueReference",
"min": 1,
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-organization"
}
]
}
]
}
}

View File

@ -0,0 +1,72 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-relatedperson-role",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson-role",
"version": "2.0.0",
"name": "nl core relatedperson role",
"title": "nl-core-relatedperson-role",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "Extension to support RelatedPerson.role",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v1.2(2015EN)",
"name": "HCIM ContactPerson-v1.2(2015EN)"
}
],
"kind": "complex-type",
"abstract": false,
"contextType": "resource",
"context": [
"RelatedPerson"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson-role"
},
{
"id": "Extension.value[x]:valueCodeableConcept",
"path": "Extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"short": "Role",
"alias": [
"Rol"
],
"min": 1,
"type": [
{
"code": "CodeableConcept"
}
],
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.2",
"comment": "Role"
}
]
}
]
}
}

View File

@ -0,0 +1,416 @@
{
"resourceType": "StructureDefinition",
"id": "nl-core-relatedperson",
"url": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson",
"version": "2.0.2",
"name": "nl-core-relatedperson",
"title": "nl-core-relatedperson",
"status": "active",
"publisher": "HL7 Netherlands",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "A RelatedPerson resource as defined by the Dutch Health and Care Information models or HCIM (Dutch: Zorginformatiebouwsteen or ZIB) ContactPersoon version 3.1 (Release 2017). The HCIM ContactPerson is meant to deal with both related persons and contacts. This profile targets instantiations of the HCIM ContactPerson who are related persons. An HCIM ContactPerson who is a contact for a patient, belongs in Patient.contact. If a person is both a related person and a contact person, then some data duplication is inevitable. This may or may not be resolved in a future version of the Patient/RelatedPerson resources.",
"purpose": "Recording relevant information to identify the contacts.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v1.2(2015EN)",
"name": "HCIM ContactPerson-v1.2(2015EN)"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v3.0(2016EN)",
"name": "HCIM ContactPerson-v3.0(2016EN)"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/ContactPerson-v3.1(2017EN)",
"name": "HCIM ContactPerson-v3.1(2017EN)"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"uri": "https://zibs.nl/wiki/Patient-v2.0.1(2015EN)",
"name": "HCIM Patient-v2.0.1(2015EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Patient-v3.0(2016EN)",
"name": "HCIM Patient-v3.0(2016EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/ContactInformation-v1.0(2017EN)",
"name": "HCIM ContactInformation-v1.0(2017EN)",
"comment": "ContactInformation has become an independent information model as of release 2017 of the HCIMs."
},
{
"identity": "hcim-payer-v1.2-2015EN",
"uri": "https://zibs.nl/wiki/Payer-v1.2(2015EN)",
"name": "HCIM Payer-v1.2(2015EN)"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"uri": "https://zibs.nl/wiki/Payer-v3.0(2016EN)",
"name": "HCIM Payer-v3.0(2016EN)"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"uri": "https://zibs.nl/wiki/Payer-v3.1(2017EN)",
"name": "HCIM Payer-v3.1(2017EN)"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"uri": "https://zibs.nl/wiki/BasicElements-v1.0(2017EN)",
"name": "HCIM BasicElements-v1.0(2017EN)"
}
],
"kind": "resource",
"abstract": false,
"type": "RelatedPerson",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "RelatedPerson",
"path": "RelatedPerson",
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.1",
"comment": "Contact"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.1",
"comment": "Contact"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.1",
"comment": "Contact"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.5",
"comment": "RelatedPersonAsInformationSource::ContactPerson"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.10",
"comment": "RelatedPersonAsAuthor::ContactPerson"
},
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.13",
"comment": "RelatedPersonAsSubject::ContactPerson"
}
]
},
{
"id": "RelatedPerson.extension",
"path": "RelatedPerson.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "RelatedPerson.extension:role",
"path": "RelatedPerson.extension",
"sliceName": "role",
"short": "Role",
"definition": "Defines the role of the contact in relation to the patient.",
"alias": [
"Rol"
],
"type": [
{
"code": "Extension",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson-role"
}
],
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.2",
"comment": "Role"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.2",
"comment": "Role"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.2",
"comment": "Role"
}
]
},
{
"id": "RelatedPerson.extension:role.valueCodeableConcept:valueCodeableConcept",
"path": "RelatedPerson.extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"binding": {
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.3.1.2--20171231000000",
"display": "RolCodelijst"
}
}
},
{
"id": "RelatedPerson.identifier",
"path": "RelatedPerson.identifier",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.6",
"comment": "IdentificationNumber"
}
]
},
{
"id": "RelatedPerson.patient",
"path": "RelatedPerson.patient",
"type": [
{
"code": "Reference",
"targetProfile": "http://fhir.nl/fhir/StructureDefinition/nl-core-patient"
}
],
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.11",
"comment": "Subject"
}
]
},
{
"id": "RelatedPerson.relationship",
"path": "RelatedPerson.relationship",
"short": "Relationship",
"definition": "Defines the contacts familial relationship to the patient.",
"alias": [
"Relatie"
],
"binding": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "PatientRelationshipType"
}
],
"strength": "extensible",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.3.1.1--20171231000000",
"display": "RelatieCodelijst"
}
},
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.3",
"comment": "Relationship"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.3",
"comment": "Relationship"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.3",
"comment": "Relationship"
}
]
},
{
"id": "RelatedPerson.name",
"path": "RelatedPerson.name",
"short": "NameInformation",
"definition": "Full name of the contact.",
"alias": [
"Naamgegevens"
],
"type": [
{
"code": "HumanName",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-humanname"
}
],
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.4",
"comment": "Name"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.4",
"comment": "Name"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.4",
"comment": "NameInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.5",
"comment": "PayerName"
}
]
},
{
"id": "RelatedPerson.telecom",
"path": "RelatedPerson.telecom",
"short": "ContactInformation",
"alias": [
"Contactgegevens"
],
"type": [
{
"code": "ContactPoint",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-contactpoint"
}
],
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.6",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.6",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v2.0.1-2015EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v3.0-2016EN",
"map": "NL-CM:0.1.5",
"comment": "ContactInformation"
},
{
"identity": "hcim-contactinformation-v1.0-2017EN",
"map": "NL-CM:20.6.4",
"comment": "TelephoneNumber"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.12",
"comment": "TelephoneE-mail"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.12",
"comment": "ContactInformation"
}
]
},
{
"id": "RelatedPerson.address",
"path": "RelatedPerson.address",
"short": "AddressInformation",
"alias": [
"Adresgegevens"
],
"type": [
{
"code": "Address",
"profile": "http://fhir.nl/fhir/StructureDefinition/nl-core-address"
}
],
"mapping": [
{
"identity": "hcim-contactperson-v1.2-2015EN",
"map": "NL-CM:3.1.5",
"comment": "Address"
},
{
"identity": "hcim-contactperson-v3.0-2016EN",
"map": "NL-CM:3.1.5",
"comment": "Address"
},
{
"identity": "hcim-contactperson-v3.1-2017EN",
"map": "NL-CM:3.1.5",
"comment": "AddressInformation"
},
{
"identity": "hcim-payer-v1.2-2015EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.0-2016EN",
"map": "NL-CM:1.1.17",
"comment": "Address"
},
{
"identity": "hcim-payer-v3.1-2017EN",
"map": "NL-CM:1.1.17",
"comment": "AddressInformation"
}
]
},
{
"id": "RelatedPerson.period",
"path": "RelatedPerson.period",
"mapping": [
{
"identity": "hcim-basicelements-v1.0-2017EN",
"map": "NL-CM:0.0.14",
"comment": "DateTime"
}
]
}
]
}
}

View File

@ -0,0 +1,137 @@
{
"resourceType": "StructureDefinition",
"id": "patient-proficiency",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode": "pa"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger": 1
}
],
"url": "http://nictiz.nl/fhir/StructureDefinition/patient-proficiency",
"version": "2.0.1",
"name": "proficiency",
"title": "proficiency",
"status": "active",
"publisher": "HL7",
"description": "Proficiency level of the communication.\r\nExtension is mocked from the offical HL7 core extension in R4 FHIR build specification at 12-09-2018.",
"fhirVersion": "3.0.2",
"mapping": [
{
"identity": "rim",
"uri": "http://hl7.org/v3",
"name": "RIM Mapping"
}
],
"kind": "complex-type",
"abstract": false,
"contextType": "resource",
"context": [
"Patient.communication"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension",
"path": "Extension",
"short": "Proficiency level of the communication",
"definition": "Proficiency level of the communication."
},
{
"id": "Extension.extension",
"path": "Extension.extension",
"slicing": {
"discriminator": [
{
"type": "value",
"path": "url"
}
],
"rules": "open"
}
},
{
"id": "Extension.extension:type",
"path": "Extension.extension",
"sliceName": "type",
"short": "The proficiency type of the communication",
"definition": "What type of communication for the proficiency (spoken, written, etc.).",
"min": 1,
"max": "1"
},
{
"id": "Extension.extension:type.url",
"path": "Extension.extension.url",
"fixedUri": "type"
},
{
"id": "Extension.extension:type.value[x]:valueCoding",
"path": "Extension.extension.valueCoding",
"sliceName": "valueCoding",
"min": 1,
"type": [
{
"code": "Coding"
}
],
"binding": {
"strength": "preferred",
"description": "The proficiency type for the communication.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/v3-LanguageAbilityMode",
"display": "TaalvaardigheidBegrijpenCodelijst"
}
}
},
{
"id": "Extension.extension:level",
"path": "Extension.extension",
"sliceName": "level",
"short": "The proficiency level of the communication",
"definition": "How well the patient can communicate this communication (good, poor, etc.).",
"min": 1,
"max": "1"
},
{
"id": "Extension.extension:level.url",
"path": "Extension.extension.url",
"fixedUri": "level"
},
{
"id": "Extension.extension:level.value[x]:valueCoding",
"path": "Extension.extension.valueCoding",
"sliceName": "valueCoding",
"min": 1,
"type": [
{
"code": "Coding"
}
],
"binding": {
"strength": "preferred",
"description": "The proficiency level for the communication.",
"valueSetReference": {
"reference": "http://hl7.org/fhir/ValueSet/v3-LanguageAbilityProficiency",
"display": "TaalvaardigheidBegrijpenCodelijst"
}
}
},
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://nictiz.nl/fhir/StructureDefinition/patient-proficiency"
},
{
"id": "Extension.value[x]",
"path": "Extension.value[x]",
"max": "0"
}
]
}
}

View File

@ -0,0 +1,82 @@
{
"resourceType": "StructureDefinition",
"id": "zib-patient-legalstatus",
"url": "http://nictiz.nl/fhir/StructureDefinition/zib-patient-legalstatus",
"version": "1.0.0",
"name": "zib patient legalstatus",
"title": "Patient LegalSatus",
"status": "active",
"publisher": "Nictiz",
"contact": [
{
"name": "Nictiz",
"telecom": [
{
"system": "email",
"value": "info@nictiz.nl",
"use": "work"
}
]
}
],
"description": "The legal situation that applies to the patient during treatment/procedures.",
"copyright": "CC0",
"fhirVersion": "3.0.2",
"kind": "resource",
"abstract": false,
"contextType": "resource",
"context": [
"Patient",
"Procedure"
],
"type": "Extension",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Extension",
"path": "Extension",
"short": "legalStatus",
"definition": "The legal situation that applies to the patient during the intervention. The code of the legal status is based on the Vektis/AZR code list COD232-VEKT Legal Status.",
"comment": "The concept LegalStatus of the Zib FreedomRestrictingMeasures plays an importand role in the context of mental healthcare (GGZ). This concept will become an independent Zib with the next release of Zibs (2018 release). \r\n\r\nThe LegalStatus concept and associated valueset will be split in two concepts: legalstatus and representative. These concept are currently captured in one valueset. It is possible to have a legalstatus AND a representative. Therefore, we allow this extension to have a cardinality of 0..2.",
"max": "2"
},
{
"id": "Extension.url",
"path": "Extension.url",
"fixedUri": "http://nictiz.nl/fhir/StructureDefinition/zib-patient-legalstatus"
},
{
"id": "Extension.value[x]:valueCodeableConcept",
"path": "Extension.valueCodeableConcept",
"sliceName": "valueCodeableConcept",
"code": [
{
"system": "http://snomed.info/sct",
"code": "303186005",
"display": "Legal status of patient (observable entity)"
}
],
"short": "LegalStatus",
"definition": "The legal situation that applies to the patient during the intervention. The code of the legal status is based on the Vektis/AZR code list COD232-VEKT Legal Status.",
"alias": [
"JuridischeStatus"
],
"type": [
{
"code": "CodeableConcept"
}
],
"binding": {
"strength": "preferred",
"description": "LegalStatusCodelist",
"valueSetReference": {
"reference": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.14.3.2--20171231000000",
"display": "JuridischeStatusCodelijst"
}
}
}
]
}
}